Member-only story
Piper: CLI LLM Text to Speech on Ubuntu
Piper is a really amazing Text-to-Speech project for making your LLM able to talk. I had some initial difficulty using piper on my Ubuntu 22 box, and figured I’d document what I did recently to get all the latest code working. Not a huge article, just sharing what I learned.
Piper really has three major portions and some additional tools to install, but I got it working. If these don’t work on your instance, let me know and I’ll dig through my history and see if there was anything else I missed.
Here’s the basics I had to use to get piper running:
mkdir piper-chat
cd piper-chat
#required to build piper
sudo apt-get install espeak-ng
#There's a path error in piper, so I just created a symbolic link
sudo ln -s /usr/lib/x86_64-linux-gnu/espeak-ng-data /usr/share/espeak-ng-data
#instead of downloading parts, I just pulled all three projects
git clone https://github.com/rhasspy/piper.git
git clone https://github.com/rhasspy/piper-voices.git
git clone git@github.com:rhasspy/piper-phonemize.git
#building, I couldn't run tests.. but things could generally
#be installed with `sudo make install` or looking in the `build/`
#directories
#I may have had to run this from the build/ directory.. included here
cd piper-phonemize
make
cd build/
sudo make install
cd ../piper/
make
cp build/piper ../
#ok, now you should have a piper binary in the piper-chat directory
#Make it say something
echo 'Hello world, this is a test' | ./piper --model…