This is the tts service which accepsts REST API /tts
post. Generated wav
is then saved to repository🤖
TTS REST API wrapper with FastAPI and Docker, for your text-to-speech needs🤖
- To build image, run
docker build . --tag eyay/tts-service
- To run image, run
docker run -d -p 7861:7861 -v ./audio:/code/audio --name tts-service eyay/tts-service
- Make sure to have the
-v
volume parameter to avoid redownloading models. - For CPU only, use
ghcr.io/coqui-ai/tts-cpu
, for GPU useghcr.io/coqui-ai/tts
as Dockerfile base image. - Go to
http://127.0.0.1:7861/api/
to check the app
- to convert text to speech, use the
POST
endpoint/api/tts/
with payload of{message:"read this"}
. this returns the filename of the audio - to read back converted speech, use the
GET
endpoint/api/voice/
with audio filename set a query paramsname
e.g..../api/voice?name=sample01.wav