Before the shofar-blowing is begun, two berakhot are recited: A) “Blessed are You, Lord our God, King of the universe, Who has made us holy through His commandments and has commanded us to hear the sound of the shofar” (“asher kideshanu be-mitzvotav ve-tzivanu lishmo’a kol shofar”). B) “Blessed are You, Lord our God, King of the universe, Who has given us life, sustained us, and brought us to this time” (“she-heḥeyanu ve-kiyemanu ve-higi’anu la-zeman ha-zeh”). While Sephardim do not recite She-heḥeyanu on the second day, Ashkenazim do. If possible, it is preferable that the shofar-blower wear a new item of clothing and have that in mind as well when he recites the berakha (SA 500:3; MB ad loc. 7).
Our Sages were precise in formulating the berakha which concludes “to hear the sound of the shofar,” as the mitzva is to hear the shofar, not to blow it (SA 585:2). Thus, a deaf person is exempt from the mitzva even though he is capable of blowing the shofar. One who is hearing impaired but can still hear the blasts is obligated in the mitzva and may even blow on behalf of others. One who wears an electronic hearing aid should remove it so that he hears the unmediated sound of the shofar.
Since the mitzva is to hear the sound of the shofar, if one blows the shofar into a pit or a bomb shelter so that he hears the sound of the shofar together with its echo, he has not fulfilled his obligation, because the sound he hears is not that of the shofar alone. However, those who are in the pit or bomb shelter, since they do not hear an echo, have fulfilled their obligation (Rosh Ha-shana 27b, 20a; SA 587:1-2; MB ad loc. 10).
One who is mute but can hear is obligated in the mitzva and can fulfill it on behalf of others. One of the listeners should recite the berakhot. One who is mentally incompetent is exempt from all mitzvot, including shofar (SA 589:2; MB ad loc. 4).
If the shofar-blower already fulfilled his obligation and is now blowing for people who did not yet fulfill their obligation, it is preferable for one of them to recite the berakhot. Nevertheless, when this situation arises in practice, it is common for the shofar-blower to recite the berakha, and there are grounds for this practice (Beit Yosef and Rema 585:2; MB ad loc. 5).
Mitzvot require intent. Therefore, one who is practicing shofar-blowing does not fulfill his obligation, even if he blows the requisite blasts. Similarly, if one is at home and hears the shofar being blown at a nearby synagogue but does not have in mind to fulfill his obligation, he does not fulfill it. In order for a listener to fulfill his obligation, both he and the shofar-blower must have this in mind. The shofar-blower must have in mind to fulfill the obligation for anyone who hears him, not just those he can see, because there may be people outside the synagogue or in nearby homes who want to fulfill their obligation. If the shofar-blower has in mind only to fulfill the obligation of those he sees, these additional people will not fulfill their obligation (SA 589:8-9). Le-khatḥila, the shofar-blower must explicitly have in mind to fulfill the obligation of all listeners, and listeners must explicitly have in mind to fulfill the mitzva. However, be-di’avad, even if they did not have this in mind explicitly, as long as they had latent intent, they fulfilled their obligation. Latent intent means that if one were to ask the shofar-blower why he blew, he would answer: to fulfill the obligation of all the listeners. And if one were to ask a listener why he came to hear the shofar, he would answer: to fulfill the mitzva (Peninei Halakha: Prayer 15:8).
One who hears the shofar by means of an electronic hearing aid does not fulfill the mitzva according to most poskim. Some say that this is because the sound produced by the device is not the sound of the shofar. Rather, the device receives the sounds as electronic signals and then translates them into a new sound – the sound of the device, not the sound of the shofar (Mishpetei Uziel¸ Mahadura Kama OḤ §21 and Mahadura Tinyana, OḤ §34; Terumat Ha-goren 1:22; R. Shlomo Zalman Auerbach, Minḥat Shlomo 1:9). Others say that one may fulfill other mitzvot that require listening by means of an electronic hearing aid, but when it comes to shofar, one should be stringent, because if one heard the echo of the shofar, he did not fulfill his obligation (Rav Kook, Oraḥ Mishpat §48; R. Frank writes accordingly in Mikra’ei Kodesh, Purim §11, with regard to hearing the megilla; Beit Avi 3:92; Igrot Moshe EH 3:33). However, some are lenient and consider hearing the shofar by means of a device to be the equivalent of regular hearing (Rav Orenstein, Assia 77-78; Yabi’a Omer OḤ 7:18; this is also the inclination of Minḥat Yitzḥak 3:11; see Peninei Halakha: Berakhot 12:9).
In practice, since most poskim maintain that one does not fulfill his obligation by hearing through an electrical device, one who has such a device must remove it, for as long as it is in his ear, he cannot hear the original sound of the shofar. However, one who cannot hear the shofar without the device should leave it in, because according to some poskim he fulfills the mitzva in this way. He cannot be the shofar-blower, though, because according to most poskim he is not obligated in this mitzva.
The same applies to someone with cochlear implants. It would seem that when hearing by means of implants improves to the point that it is really like hearing normally, we will accept the view of R. Orenstein that hearing in this way is considered hearing normally.