"And the Feast of Harvest, the first fruits of your labors" (Exodus 23:16): the three festivals are stated regarding the Sabbatical year, that the three festivals not be moved from their place. (Exodus 23:17) One who speaks but does not hear, or hears but does not speak, is exempt from the appearance but obligated in rejoicing. Why is it different regarding the appearance, that he is exempt? Because the appearance is derived by a verbal analogy of "appearance, appearance" from the Assembly [Hakhel]. And there, from where do we know they are exempt? As it is written, "that they may hear" (Deuteronomy 31:12), excluding one who speaks but does not hear; "and that they may learn," excluding one who hears but does not speak. Does this mean that one who cannot speak cannot learn? But there were two mute men in the neighborhood of Rabbi, sons of the daughter of Rabbi Yochanan ben Gudgeda, who whenever Rabbi entered the study house would enter before him and nod their heads and move their lips; and Rabbi prayed for mercy on their behalf and they were healed, and it was found that they had mastered halakhah, Sifra, Sifrei, and the whole Talmud. Mar Zutra said: read it "that they may teach." Rav Ashi said: certainly "that they may teach," for if it should enter your mind to read "that they may learn," since one who does not speak cannot learn, that would be derived from "that they may hear"; rather, certainly it is "that they may teach."
The Deaf and Mute Are Exempt From Appearance Yet Bound to Rejoice
Yalkut Shimoni on Torah 356:3
(שמות כג טז) וְחַג הַקָּצִיר בִּכּוּרֵי מַעֲשֶׂיךָ, נֶאֱמַר שָׁלֹשׁ רְגָלִים לְעִנְיָן שְׁבִיעִית שֶׁלֹּא יִסָּתְרוּ שָׁלֹשׁ רְגָלִים מִמְּקוֹמָן. (שמות כג יז) חֵרֵשׁ הַמְּדַבֵּר וְאֵינוֹ שׁוֹמֵעַ, שׁוֹמֵעַ וְאֵינוֹ מְדַבֵּר, פָּטוּר מִן הָרְאִיָּה וְחַיָּב בְּשִׂמְחָה. מַאי שְּׁנָא לְעִנְיָן רְאִיָּה דְּפָטוּר. דְּגְמַר רְאִיָּה רְאִיָּה מֵהַקְהֵל, וְהָתָם מִנָּלָן דִּפְטִירֵי, דִּכְתִיב (דברים לא, יב) "לְמַעַן יִשְׁמְעוּ(ן)", פְּרַט לִמְדַבֵּר וְאֵינוֹ שׁוֹמֵעַ, "וּלְמַעַן יִלְמְדוּ(ן)", פְּרָט לְשׁוֹמֵעַ וְאֵינוֹ מְדַבֵּר. לְמֵימְרָא דְּכִי לָא מִשְׁתָּעֵי לָא גְמַר, וְהָא הַנְהוּ תְּרֵי אִלְּמֵי דַּהֲווּ בְּשִׁיבְבוּתֵיהּ דְּרַבִּי, בְּנֵי בְּרַתֵּיהּ דְּרַבִּי יוֹחָנָן בֶּן גּוּדְגְּדָא, דְּכָל אֵימַת דַּהֲוָה עָיִיל רַבִּי לְבֵי מִדְרָשָׁא הֲווּ עָיְילֵי קַמֵּיהּ וְנָיְידֵי בְּרֵישַׁיְיהוּ וּמְרָחֲשֵׁי בְּשִׂפְוָתַיְיהוּ, וּבָעָא רַבִּי רַחֲמֵי עֲלַיְיהוּ וְאִיתְּסוּ, וְאִשְׁתַּכְּחוּ דַּהֲוֵי גְמִירֵי הִלְכְתָא סִפְרָא וְסִפְרִי וְתוֹסֶפְתָּא וְכֻלֵּי תַלְמוּדָא, אֲמַר מַר זוּטְרָא, קְרִי בֵיהּ "לְמַעַן יְלַמְּדוּ". רַב אַשִּׁי אֲמַר, וַדַּאי לְמַעַן יְלַמְּדוּ, דְּאִי סַלְקָא דַּעְתָּךְ "לְמַעַן יִלְמְדוּ", כֵּיוַן דְּלָא מִשְׁתָּעֵי לָא גְמַר וְכוּ' הַאי מִ"לְמַעַן יִשְׁמְעוּן" נַפְקָא, אֶלָּא וַדַּאי לְמַעַן יְלַמְּדוּ הוּא.