This project delivers a Dockerfile for the open source TTS (text-to-speech) application Piper.
Using the Docker image you do not need to install the correct Python version (3.10/3.11) nor Piper.
You can enter the Docker container using bash and call the Piper CLI.
The advantage of using Docker for running Piper is that you do not need to install neither the correct Python version nor the Piper program itself. Also, everything is isolated within the Docker container.
First run Docker build to create the image:
./docker-build.sh
docker run -it -v ./:/home piper-cli-docker /bin/bash
Using the '-v' option creates a volume and exposes the /home directory within the container to the local folder. Therefore, any files created, like the resulting audio file are exposed to the host system.
Inside the container run:
cd /home
echo 'Welcome to the world of speech synthesis!' | piper \
--model en_US-lessac-medium \
--output_file welcome.wav
MIT License