when you hear the cocks crowing, ask Allah for some of His grace, for they have seen as angel; but when you hear an ass braying, seek refuge in Allah from the devil, for it has seen the devil. (Using translation from Abū Dāʾūd 5102)
"إذا سَمِعْتُمْ أصْوَاتَ الدِّيكةِ فَسَلُوا الله مِنْ فَضله، فإنَّها رأتْ مَلَكًا، وإذا سَمِعْتُمْ نَهِيقَ الحمير فتعَوَّذُوا بالله مِنَ الشَّيطانِ، فإِنَّها رأتْ شَيطانًا"