Add Edge TTS generic output module - #1110
Conversation
sthibaul
left a comment
There was a problem hiding this comment.
Thanks for this, just a few fixes are needed.
|
Thanks for the review. I’ve addressed the requested changes: Added copyright information to the configuration. Please let me know if any further changes are needed. |
|
he Edge TTS voices are provided by the online Edge TTS service and do not depend on local voice files, so VoiceFileDependency is not applicable here. GenericCmdDependency "edge-tts" ensures that the module is disabled when the edge-tts command is unavailable. |
| GenericDefaultCharset "utf-8" | ||
|
|
||
| GenericExecuteSynth \ | ||
| "printf %s \'$DATA\' >$TMPDIR/edge-tts.txt && edge-tts -f $TMPDIR/edge-tts.txt -v \'$VOICE\' --write-media $TMPDIR/edge-tts.mp3 && $PLAY_COMMAND $TMPDIR/edge-tts.mp3" |
There was a problem hiding this comment.
Unfortunately, when the user configured to use the alsa audio device, $PLAY_COMMAND is aplay, which does not support the mp3 formation. Can edge-tts support wave format? That'll also avoid having to compress the audio, only for the audio player to re-decompress it.
Also, ideally you would avoid using temporary files, by passing the data through pipes | . If edge-tts does not have a special notation for that (it's often - to be given as file name), you can trick it by passing it /dev/stdin and /dev/stdout.
sthibaul
left a comment
There was a problem hiding this comment.
You also need to add the file in config/modules/Makefile.am to dist_moduleconf_DATA and dist_moduleconforig_DATA
|
Also, please mention the support in |
Summary
Adds an initial generic output module configuration for using Microsoft Edge TTS with Speech Dispatcher.
Changes
config/modules/edgetts-generic.confen-US,hi-IN,bn-IN, andgu-IN/bin/shto/bin/bashset -o pipefail/bin/shresolves todashon the tested WSL environment, which does not supportpipefailTesting
Tested locally on WSL2 with Speech Dispatcher and Edge TTS.
Verified that: