Howie Seago, who played Riva, is in fact deaf and uses American Sign Language. He petitioned the producers to create a show about deaf people, in part to dispel untrue and prejudiced myths about them. In the first draft, Riva learned to speak overnight after a mechanical translator he used to communicate with his chorus failed. Seago suggested the ending used in the finished episode the day prior to shooting.
(Star Trek: The Next Generation Companion 2nd ed., p. 73, via Memory-Alpha)