-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A native output module based on piper TTS. #996
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
I have comments that are required before inclusion, but nothing really invasive. If you can't manage around configure.ac
, I can work on that. We'll also need a CI to make sure it works, but again I can work on that.
# single speaker or multi-speaker. Single speaker models produce a | ||
# single speech dispatcher voice. The speech dispatcher voice name | ||
# can be listed with 'spd-say -o cxxpiper -L', but it is | ||
not needed as the voice will be the default, and only, voice available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is missing a #
|
||
# ModelPath and ConfigPath are required. There should be exactly one of each of them. | ||
ModelPath "/home/ddavies/src/piper-models/clean100.onnx" | ||
ConfigPath "/home/ddavies/src/piper-models/clean100.onnx.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot hardcode such a path. Is there not standard path defined by piper? Something like /srv/something or /opt/something?
# file for a multi-speaker model contains a "speaker_id_map" object | ||
# that lists an integer speaker id and string mneumonic for each | ||
# speaker supported by the model. Since speech dispatcher has no | ||
# notion of speaker id, speaker selection detqails are hidden from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in detqails
# NB: Unsure if onnx models may allow different " languages within | ||
# the same multi-speaker model. REgardless, if there's sufficient memory: it might be possible to load multiple | ||
# models and have cxxpiper select between them, while presenting the union of | ||
# the speakers and languages of each model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will be nice long-term to be able to load several models. Even better, list all of them but load them only on-demand, so people don't have to modify any file but just install a model package and see the language pop-up in orca
# english-us+male7 en-US male7 | ||
# english-us+whisper en-US whisper | ||
# english-us+female1 en-US female1 | ||
## english-us+croak en-US croak |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are these lines?
else { | ||
piperConfig.useESpeak = false; | ||
} | ||
cxxpiper::initialize(piperConfig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
} | ||
|
||
SPDVoice **module_list_voices(void) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's odd indentation, it is not consistent
cxxpiper_handle_sound_icon(data); | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This double }
is odd, better either indent the whole content of the switch
, or the content of each case
.
DBG("Sending begin event"); | ||
module_report_event_begin(); | ||
(void)cxxpiper::textToAudio(piperConfig, voice, cmdInp, | ||
audioBuffer, result, audioCallback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does piper support pipelining? To start sending audio to the server before the whole audio is produced. That would be really important to get good reactivity (but it's fine not to have it for first inclusion)
switch (msgtype) { | ||
case SPD_MSGTYPE_CHAR: | ||
case SPD_MSGTYPE_KEY: | ||
case SPD_MSGTYPE_SPELL: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't ignore them, that'd break some screen reading support.
I have added to CI a rule to install piper in |
Grateful for your fixes to CI and Makefile.am -- thank you. |
'Native' means it's written in C++, so it does not incur the overhead of the generic output modulebased on the piper command line utility.