summarylogtreecommitdiffstats
path: root/piper-voices-common.install
blob: bc0daf4654105274962213c5f38004bd499214af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
post_install(){
 cat <<INFO
 
# ################################################################ PIPER-TTS

To generate an audio file with piper-tts, run

    model="/usr/share/piper-voices/en/en_US/ryan/high/en_US-ryan-high.onnx"
    export model
    echo "Hello world" | piper-tts --model "\$model" --output_file hello.wav

To speak, run

    echo "Hello world" | piper-tts --model "\$model" --output-raw | aplay -r 22050 -f S16_LE -t raw -
    
# ################################################################ SPEECH-DISPATCHER

To use piper and its voices as system speech dispatcher, install one of the packages
in the "piper-voices" group. Then, open

    /etc/speech-dispatcher/speechd.conf
    
and paste at the end the following:

    AddModule        "piper-generic" "sd_generic" "piper-generic.conf"
    DefaultModule    piper-generic
    DefaultVoiceType "MALE1"
    DefaultLanguage  "en"

You should now be able to run

    spd-say "Hello world"

INFO
}