Skip to content

Go Lang API Wrapper around Piper TTS - Supports TTS Inference and List of Voices

License

Notifications You must be signed in to change notification settings

arunk140/serve-piper-tts

Repository files navigation

serve-piper-tts

Voice Samples from Piper - https://rhasspy.github.io/piper-samples/

image

Hosted API Test Server (Temporary Link) - https://voice.arunk140.com/ | https://voice.arunk140.com/api/tts?text=github

Go Lang API Wrapper around Piper TTS - Supports TTS Inference and List of Voices


Install with Docker

docker pull ghcr.io/arunk140/serve-piper-tts:latest
docker run -p 8080:8080 ghcr.io/arunk140/serve-piper-tts:latest

OR

docker compose up -d

Add you Piper Voice Models from or use the download script (to the models directory)

To download and extract specific files for a language, use the following format:

./download-voices.sh LANG_CODE

e.g. to download en (English) Voices

chmod +x ./download-voices.sh
./download-voices.sh en

Check the download-voices.sh file for a list of voices and supported languages.

Get the Latest Piper Executable from Piper's GitHub Releases or using the Download Script (download and extract in the same folder)

chmod +x ./download-piper.sh
./download-piper.sh

To run the API server directy -

go run .

To Build executable and Run -

go build
./serve-piper-go

Runs on Port 8080 By default - Update main.go constant to change port

http://localhost:8080/

API Docs in Docs.md