Who played ted in the movie ted?

Seth MacFarlane played the voice of Ted.