sd_piper: add module for piper speech synthesis #998
+734
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been working on a dedicated piper module (for #866). I just pulled from master and noticed that the latest commit (bec5519) alludes to work in progress on a cxxpiper module, so I wanted to share my work asap to ensure that I wasn't stepping on any toes and see if you would like to collaborate.
The module makes use of the user's installation of the piper binary instead of linking in the piper codebase directly. This means that each speak request forks a child process with the appropriate arguments. Communication with the child is done over pipes. Server audio is used so speechd handles output to the configured audio device.
The module supports usual speechd configuration and runtime parameters:
AddVoice
directives for configuring the voice models to userate
- setting of voice speed (between 0.5x and 2x)As well as some piper specific configuration:
sentence_silence
- seconds of silence after each sentencenoise_scale
- generator noisenoise_w
- phoneme width noiseThis changeset is based on master, but I originally did this work on the 0.11 branch, so it can be easily backported if required.