´Abu Sa'eed Al-Khudri said:` "The Messenger of Allah said: 'When the Janazah (prepared body) is placed (on the bier) and the men lift it onto their shoulders, if it was a righteous person it says: Take me quickly, take me quickly. And if it was not a righteous person it says: Woe to me! Where are you taking me! And everything hears its voice except man, and if man heard it he would faint."'
Hadith Referenceسنن نسائي / كتاب الجنائز / 1910
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:صحيح بخاري
1910. Commentary: ➊ It is not impossible that animals perceive things which humans do not, because Allah Ta'ala has endowed animals with great abilities. For example: the sense of smell (quwwat-e-shammah) in dogs is astonishingly superior to that of humans. A dog can reach a person merely by smelling that person's empty clothes. This ability is absent in humans, for example: hunting and tracking dogs. ➋ "Loses consciousness" means upon hearing the terrifying sound of this evil person (the deceased). ➌ It is Allah Ta'ala's grace that He does not let living people hear this sound. ➍ Carrying the bier (janazah) is legislated for men; women should not carry it.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 1910