In the very first Doctor Dolittle book, 'The Story of Doctor Dolittle', the titular doctor is taught to speak the "language of the animals" by his pet parrot, Polynesia
"What would have been the good?" said Polynesia, dusting some
cracker–crumbs off her left wing. "You wouldn't have understood me if
"Tell me some more," said the Doctor, all excited; and he rushed over
to the dresser–drawer and came back with the butcher's book and a
pencil. "Now don't go too fast—and I'll write it down. This is
interesting—very interesting—something quite new. Give me the Birds'
A.B.C. first—slowly now."
So that was the way the Doctor came to know that animals had a
language of their own and could talk to one another. And all that
afternoon, while it was raining, Polynesia sat on the kitchen table
giving him bird words to put down in the book.
In the 1967 film version the genesis is extremely quite similar. The good Doctor is well aware that animals have language and is studying a wide range of animal languages (notably halibut and goldfish) but is quite surprised to find that animals have also been studying human languages and that parrots are quite capable of speaking human. His parrot then takes it upon itself to teach him to speak properly.
Dolittle: Animals actually talk to one another?!
Parrot: But of course we can
Dolittle: I knew parrots could talk
Parrot: Parrots are the finest linguists in the animal kingdom