Package: piper-whistle
piper-whistleTool to manage voices used with thepiperspeech synthesizer. You may also browse thedocs onlineathttps://think-biq.gitlab.io/piper-whistle/There is alsoa quick guideon how to setup and use piper and (piper-)whistle.usageusage:piper_whistle[-h][-d][-v][-V][-PDATA_ROOT][-R]{refresh,guess,path,speak,list,preview,install,remove}...

positionalarguments:{refresh,guess,path,speak,list,preview,install,remove}optionalarguments:-h,--helpShowhelpmessage.-d,--debugActivateveryverboselogging.-v,--verboseActivateverboselogging.-V,--versionShowversionnumber.-PDATA_ROOT,--data-rootDATA_ROOTRootpathwherewhistleshouldstoreconfiganddatain.-R,--refreshRefreshes(orsetsup)languageindexbydownloadingthelatestlookup.commandsguessusage:piper_whistleguess[-h][-v]language_name

positionalarguments:language_nameAstringrepresentingalanguagename(orcode).

optionalarguments:-h,--helpShowhelpmessage.-v,--verboseActivateverboselogging.Tries to guess the language you are looking for (and is supported bypiper) from the name you provide.pathusage:piper_whistlepath[-h][-v]voice_selector

positionalarguments:voice_selectorSelectorofvoicetosearch.

optionalarguments:-h,--helpshowthishelpmessageandexit-v,--verboseActivateverboselogging.Shows the local path to a specific model. The voice_selector has the format:${CODE}:${NAME}@${QUALITY}/${SPEAKER}The${SPEAKER}part is optional; as is the${CODE}part. So if you want to select the voice named 'alba' in quality 'medium', you could simply query:alba@mediumThe language code is infered.
Alternatively, you can just query with the model name listed by thelistcommand.${CODE}-${NAME}-${QUALITY}So for the example above, that would been_GB-alba-mediumspeakusage:piper_whistlespeak[-h][-cCHANNEL][-j][-r][-oOUTPUT][-v]something

positionalarguments:somethingSomethingtospeak.

optionalarguments:-h,--helpShowhelpmessage.-cCHANNEL,--channelCHANNELPathtochannel(namedpipe(aka.fifo))towhichpiperislistening.-j,--jsonEncodethetextasjsonpayload.Isonbydefault.-r,--rawEncodethetextdirectly.-oOUTPUT,--outputOUTPUTInsteadofstreamingtoaudiochannel,specifiesapathtowavfilewherespeechwillbestorein.-v,--verboseActivateverboselogging.Currently only works on linux / bsd systems, with a FIFO (aka. named pipes) setup. The basic idea is, having one pipe accepting json input (provided by this command), which is listened to bypiper. Afterpiperhas processed the audio, it is either saved to file or passed on to another FIFO, which can then be read by a streaming audio player likeaplay.Example:
Assumingpiperis installed at /opt/wind/piper, the named pipes are located at /opt/wind/channels and whistle is available in $PATH, the aformentioned setup could look like the following:pipes:/opt/wind/channeld/speak - accepts json payload/opt/wind/channeld/input - read bypiper/opt/wind/channeld/ouput - written bypiperprocesses:tty0: tail -F /opt/wind/channels/speak | tee /opt/wind/channels/inputtty1: /opt/wind/piper/piper -m $(piper_whistle path alba@medium) --debug --json-input --output_raw < /opt/wind/channels/input > /opt/wind/channels/outputtty2: aplay --buffer-size=777 -r 22050 -f S16_LE -t raw < channels/outputThe tail command makes sure, that the payload on speak is send to input,
thereby keeping the file open after processing. Otherwise, the setup would exit
afterpiperhas finished the first payload. This way you can continually prompt.listusage:piper_whistlelist[-h][-v][-I][-a][-L][-g][-U][-S][-p][-lLANGUAGE_CODE][-iVOICE_INDEX]optionalarguments:-h,--helpShowhelpmessage.-v,--verboseActivateverboselogging.-I,--installedOnlylistinstalledvoices.-a,--allListvoicesforallavailablelanguages.-L,--languagesListavailablelanguages.-g,--legalShowavaiablelegalinformation.-U,--show-urlShowURLofvoiceonremotehost.-S,--omit-speakersOmitspeakersformlisting.-p,--install-pathShowpathofvoice(ifinstalled).-lLANGUAGE_CODE,--language-codeLANGUAGE_CODEOnlylistvoicesmatchingthislanguage.-iVOICE_INDEX,--voice-indexVOICE_INDEXListonlyspecificlanguagevoice.This command lets you investigate available voices for specific languages, or
simply list all available voices. Using the --installed switch, you can filter
voices that are currently installed in the local cache directory. The cache is
located in the user app path, as provided byuserpathspip package. On linux this would be${HOME}/.config/piper-whistle. You may also get the model path on the remote host using -U.previewusage:piper_whistlepreview[-h][-v][-lLANGUAGE_CODE][-iVOICE_INDEX][-sSPEAKER_INDEX][-D]optionalarguments:-h,--helpShowhelpmessage.-v,--verboseActivateverboselogging.-lLANGUAGE_CODE,--language-codeLANGUAGE_CODESelectlanguage.-iVOICE_INDEX,--voice-indexVOICE_INDEXSpecificlanguagevoice.(defaultstofirstone)-sSPEAKER_INDEX,--speaker-indexSPEAKER_INDEXSpecificlanguagevoicespeaker.(defaultstofirstone)-D,--dry-runBuildURLandsimulatedownload.Withpreview, you can download and play samples audio files, for any voice
supported bypiper. It currently usesmplayerto play the audio file.installusage:piper_whistleinstall[-h][-v][-D]language_codevoice_index

positionalarguments:language_codeSelectlanguage.voice_indexSpecificlanguagevoice.(defaultstofirstone)optionalarguments:-h,--helpShowhelpmessage.-v,--verboseActivateverboselogging.-D,--dry-runSimulatedownload/install.Withinstallyou can fetch available voice models and store them locally for
use withpiper. You may first want to search for a voice you like withlistand then note the language code and index, so install knows where to look.
The model file (onnx) as well as its accompanying config (json) file, will be
stored in the local user data path as provide byuserpaths. On linux this would be${HOME}/.config/piper-whistle.removeusage:piper_whistleremove[-h][-v]voice_selector

positionalarguments:voice_selectorSelectorofvoicetosearch.

optionalarguments:-h,--helpShowhelpmessage.-v,--verboseActivateverboselogging.Any installed voice model can be deleted, viaremove. You may pass the model name or shorthand selector.