Skip to content

Add Edge TTS generic output module - #1110

Merged
sthibaul merged 3 commits into
brailcom:masterfrom
Jyatin:feat/edge-tts-support
Aug 31, 2026
Merged

Add Edge TTS generic output module#1110
sthibaul merged 3 commits into
brailcom:masterfrom
Jyatin:feat/edge-tts-support

Conversation

@Jyatin

@Jyatin Jyatin commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an initial generic output module configuration for using Microsoft Edge TTS with Speech Dispatcher.

Changes

  • Add config/modules/edgetts-generic.conf
    • Adds support for en-US, hi-IN, bn-IN, and gu-IN
    • Adds several Edge TTS neural voices
    • Configures the generic module to invoke an Edge TTS wrapper
  • Change the generic module shell from /bin/sh to /bin/bash
    • Required because the generic module currently executes commands using set -o pipefail
    • /bin/sh resolves to dash on the tested WSL environment, which does not support pipefail

Testing

Tested locally on WSL2 with Speech Dispatcher and Edge TTS.

Verified that:

  • Speech Dispatcher invokes the generic module.
  • The Edge TTS wrapper is invoked successfully.
  • Edge TTS generates an MP3 file.
  • Audio playback works successfully.

@sthibaul sthibaul left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, just a few fixes are needed.

Comment thread config/modules/edgetts-generic.conf Outdated
Comment thread config/modules/edgetts-generic.conf Outdated
Comment thread config/modules/edgetts-generic.conf Outdated
@Jyatin

Jyatin commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I’ve addressed the requested changes:

Added copyright information to the configuration.
Replaced the unavailable speechd-edge-wrapper with the edge-tts command directly.
Added GenericCmdDependency "edge-tts" so the module is disabled when the command is unavailable.
Verified the configuration locally and confirmed that Edge TTS successfully generates audio.

Please let me know if any further changes are needed.

@Jyatin

Jyatin commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

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.

Comment thread config/modules/edgetts-generic.conf Outdated

@sthibaul sthibaul left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to add the file in config/modules/Makefile.am to dist_moduleconf_DATA and dist_moduleconforig_DATA

@sthibaul

Copy link
Copy Markdown
Collaborator

Also, please mention the support in README.md ;)

@Jyatin

Jyatin commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback. I’ve updated the Edge TTS module to avoid temporary files and use a pipe-based pipeline. The MP3 output from edge-tts is now converted to WAV using mpg123 before being passed to $PLAY_COMMAND.

I’ve also added mpg123 as a GenericCmdDependency, added edgetts-generic.conf to both distribution lists in Makefile.am, and documented Edge TTS support in README.md.

git diff --check passes and the working tree is clean. I wasn’t able to test the complete audio pipeline locally because mpg123 and aplay aren’t installed in my current WSL environment.

@sthibaul
sthibaul merged commit df6ccad into brailcom:master Aug 31, 2026
7 checks passed
@sthibaul

Copy link
Copy Markdown
Collaborator

Thanks for this!

it'll still be useful to add support for rate and pitch :)
(you'll most probably need to use the Generic{Rate,Pitch}{Multiply,Add} options to perform a conversion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants