Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:27:16

And Solomon inherited David. He said, "O people, we have been taught the language of birds, and we have been given from all things. Indeed, this is evident bounty."  

And Solomon inherited from David, prophethood and knowledge exclusively from among all his other children; and he said, ‘O people, we have been taught the speech of the birds, that is, the ability to understand their sounds, and we have been given of all things, given to prophets and kings. Indeed this, gift, is the manifest, the evident, favour’.
القرآن:٢٧:١٦

وَوَرِثَ سُلَيْمَانُ دَاوُودَ ۖ وَقَالَ يَا أَيُّهَا النَّاسُ عُلِّمْنَا مَنْطِقَ الطَّيْرِ وَأُوتِينَا مِنْ كُلِّ شَيْءٍ ۖ إِنَّ هَٰذَا لَهُوَ الْفَضْلُ الْمُبِينُ  

{وورث سليمان داود} النبوة والعلم دون باقي أولاده {وقال يا أيها الناس عُلمنا منطق الطير} أي‌: فهمَ أصواته {وأُوتينا من كل شيء} تؤتاه الأنبياء والملوك {إن هذا} المؤتى {لهو الفضل المبين} البيَّن الظاهر.