Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 4056

Graphical Environments & Desktops • Re: Piper voices or similar on Debian

$
0
0
Hello @ilu,

This is a very interesting topic.

Probably you already seen this video [1]:This is the proof-of-concept script [2] that was demonstrated in the video for testing Piper. Warning: this script downloads and executes binary files (i.e. libraries and executables from a third party. USE IT AT YOUR OWN RISK!):

Code:

# Better text to speech with piper# https://github.com/rhasspy/piper # get piperwget "https://github.com/rhasspy/piper/releases/download/v1.2.0/piper_amd64.tar.gz"tar xzvf piper_amd64.tar.gzcd piper # get voice models# https://github.com/rhasspy/piper/blob/master/VOICES.mdwget "https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_GB/alan/medium/en_GB-alan-medium.onnx"wget "https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_GB/alan/medium/en_GB-alan-medium.onnx.json" # Play the audio from textecho 'This sentence is spoken first. This sentence is synthesized while the first sentence is spoken.' | ./piper --model en_GB-alan-medium.onnx --output-raw | aplay -r 24000 -f S16_LE -t raw -
This are the piper binaries downloaded by the example code above with the first wget:

Code:

$ ls -ltotale 30764drwxr-xr-x 4 aki aki     4096  1 Aug  2023 espeak-ng-datalrwxrwxrwx 1 aki aki       22  1 Aug  2023 libespeak-ng.so -> libespeak-ng.so.1.1.51lrwxrwxrwx 1 aki aki       22  1 Aug  2023 libespeak-ng.so.1 -> libespeak-ng.so.1.1.51-rwxr-xr-x 1 aki aki   691800  1 Aug  2023 libespeak-ng.so.1.1.51lrwxrwxrwx 1 aki aki       24  1 Aug  2023 libonnxruntime.so -> libonnxruntime.so.1.14.1-rwxr-xr-x 1 aki aki 16324080  1 Aug  2023 libonnxruntime.so.1.14.1-rwxr-xr-x 1 aki aki   461024  1 Aug  2023 libpiper_phonemize.so-rwxr-xr-x 1 aki aki   461024  1 Aug  2023 libpiper_phonemize.so.1-rwxr-xr-x 1 aki aki   461024  1 Aug  2023 libpiper_phonemize.so.1.1.0-rw-r--r-- 1 aki aki 10261536  1 Aug  2023 libtashkeel_model.ort-rwxr-xr-x 1 aki aki  2825992  1 Aug  2023 piper
As you can see, it contains the libespeak-ng.so library, that is already packaged for Debian Trixie as libespeak-ng1 library [3]:

Code:

$ apt-file search libespeak-ng.solibespeak-ng-dev: /usr/lib/x86_64-linux-gnu/libespeak-ng.solibespeak-ng1: /usr/lib/x86_64-linux-gnu/libespeak-ng.so.1libespeak-ng1: /usr/lib/x86_64-linux-gnu/libespeak-ng.so.1.1.51
These are the packages that depends someway on libespeak-ng1 library in Debian Trixie:

Code:

$ apt-rdepends -r libespeak-ng1 | grep "^[a-Z]"[..]anorackbrltty-espeakemacspeak-espeak-serverespeak-ngayatana-indicator-a11yespeak-ng-espeakfreedict-tools[..]espeakupgstreamer1.0-espeaklibespeak-ng-devlibespeak-ng-libespeak-devlibespeak-ng-libespeak1speech-dispatcher-espeak-ngstardict-plugin
So, piper already uses a library used by other text-to-speech software distributed with Debian.

It would be interesting to explore ways of integrating it with the text-to-speech technologies and user program that Debian has implemented.

My 2c.

--
EDIT:

I found this while searching, but I haven't tested it yet:The link above is for the read-aloud firefox plugin (I don't use), but there are instructions about how to configure piper as a speech-dispatcher [4] backend. speech-dispatcher should be a common interface for Debian/GNU Linux speech synthesizers.

--
[1] Better Text to Speech on Linux with Piper
[2] Pastebin - Better text to speech with piper
[3] Package: libespeak-ng1 (1.52.0+dfsg-5) - Multi-lingual software speech synthesizer: shared library
[4] Package: speech-dispatcher (0.12.0-5) - Common interface to speech synthesizers
[5] Archlinux Wiki - Speech dispatcher

Statistics: Posted by Aki — 2026-02-21 08:15



Viewing all articles
Browse latest Browse all 4056

Trending Articles