I had already talked about [gtts-cli +Speech-dispatcher] (https://discuss.getsol.us/d/8459-mimic-speech-dispatcher-for-calibre/4) (but I remember that now instead of play there is play_ng), today I have tried Piper (installed with pip3).
The Piper-Generic.conf module becomes:
GenericExecuteSynth "export XDATA=\'$DATA\'; echo \"$XDATA\" | sed -z 's/\\n/ /g' | iconv -f iso-8859-1 -t utf-8 > /paththatyouwant1/logpipergeneric1utf8.txt && cat /paththatyouwant1/logpipergeneric1utf8.txt | piper --model /paththatyouwan2/voci-pipper/"$VOICE".onnx -f - | mpv --no-terminal --keep-open=no - ; rm /paththatyouwant1/logpipergeneric1utf8.txt "
GenericCmdDependency "piper"
GenericCmdDependency "mpv"
# “MALE1” and “FEMALE1” are standard names defined in
# `src/modules/module_utils_addvoice.c`.
AddVoice "en_GB" "FEMALE1" "en_GB-alba-medium"
AddVoice "en_GB" "FEMALE1" "en_GB-cori-high"
AddVoice "en_US" "FEMALE1" "en_US-libritts-high"
AddVoice "it_IT" "FEMALE1" "it_IT-paola-medium"
AddVoice "it_IT" "MALE1" "it_IT-riccardo-x_low"
DefaultVoice "it_IT-riccardo-x_low"
It works well with Foliate , Okular, Firefox with Read Aloud, Calibre but there is still some error messages in Speech-dispatcher.log::
- speechd: ERROR: waitpid() failed when waiting for child (module).
- speechd: Error: Module reported error in request from speechd (code 3xx): 300-Opening sound device failed. Reason: Cannot open plugin server. error: file not found.
300 MODULE ERROR
Has anyone else tried it or does he have suggestions to further improve the module?