Advertisement
metalx1000

Better Text to Speech with piper

May 28th, 2025 (edited)
1,268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.73 KB | None | 0 0
  1. # Better text to speech with piper
  2. # https://github.com/rhasspy/piper
  3.  
  4. # get piper
  5. wget "https://github.com/rhasspy/piper/releases/download/v1.2.0/piper_amd64.tar.gz"
  6. tar xzvf piper_amd64.tar.gz
  7. cd piper
  8.  
  9. # get voice models
  10. # https://github.com/rhasspy/piper/blob/master/VOICES.md
  11. wget "https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_GB/alan/medium/en_GB-alan-medium.onnx"
  12. wget "https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_GB/alan/medium/en_GB-alan-medium.onnx.json"
  13.  
  14. # Play the audio from text
  15. echo '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 -
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement