forked from mmpneo/curses
-
Notifications
You must be signed in to change notification settings - Fork 4
Custom TTS
zqlk256 edited this page Jan 19, 2025
·
2 revisions
You can provide your own TTS module to curses. All you need to do is specify an executable file (e.g. a shell script) that can produce sound data from plain text.
Your executable will be called with two command line arguments:
- The path to a file containing the text to be spoken, encoded as UTF-8.
- The path to which your executable is expected to write the sound data. Supported formats include WAV, FLAC, Vorbis, and MP3. It will be inferred from the file content.
So for example, if you have espeak-ng installed on your machine, you might write something like this:
# say-with-espeak.ps1
param (
[string]$textPath, # First argument: path to text file
[string]$outPath # Second argument: path to result file
)
espeak-ng -f "$textPath" -w "$outPath"and then specify say-with-espeak.ps1 as your custom TTS executable.