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:6:36

Only those who hear will respond. But the dead - Allah will resurrect them; then to Him they will be returned.  

Only those who hear, in such a way so as to understand and take heed, will answer, your call to faith; as for the dead, that is, the disbelievers — they are likened to them on account of their inability to hear — God will resurrect them, in the Hereafter, and then to Him they will be returned, and He will requite them for their deeds.
القرآن:٦:٣٦

إِنَّمَا يَسْتَجِيبُ الَّذِينَ يَسْمَعُونَ ۘ وَالْمَوْتَىٰ يَبْعَثُهُمُ اللَّهُ ثُمَّ إِلَيْهِ يُرْجَعُونَ  

{إنَّما يستجيب} دعاءك إلى الإيمان {الذين يسمعون} سمع تفهُّم واعتبار {و الموتى} أي الكفار شبههم بهم في عدم السماع {يبعثهم الله} في الآخرة {ثم إليه يرجعون} يُردون فيجازيهم بأعمالهم.