> For the complete documentation index, see [llms.txt](https://docs.febucci.com/text-animator-unity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.febucci.com/text-animator-unity/2.x/typewriter/play-sounds-when-a-letter-is-shown.md).

# Play sounds when a letter is shown

To implement typewriter sounds in your game, you can subscribe to the Typewriter’s “`OnCharacterVisible`” event and play sounds based on it.

The event passes a “char” as a parameter, so you can play different sounds based on different letters as well.

*P.S. The event is also triggered with spaces, so be sure to play sounds based on the type of character you prefer.*

***

### Example Package <a href="#example-package" id="example-package"></a>

As an example, you can install the “TypeWriter Sounds” package found inside the “Extra” folder and check its implementation.

![](/files/NLbaOnyRkQ1zBDi1b2zP)

<table><thead><tr><th width="221">Variable</th><th>Explanation</th></tr></thead><tbody><tr><td><code>Source</code></td><td>Main audio source where sounds will be played</td></tr><tr><td><code>MinSoundDelay</code></td><td>Minimum time that has to pass before playing another sound</td></tr><tr><td><code>Interrupt Previous Sound</code></td><td>If true, the previous audio will be stopped</td></tr><tr><td><code>Random Sequence</code></td><td>If true, the next audio clip to play will be chosen randomly from the “Sounds” array. If false, sounds will be played subsequently</td></tr><tr><td><code>Sounds</code></td><td>Typewriter sounds to play</td></tr></tbody></table>
