A small app written in golang to simplify Zalo TTS integration.
Try it yourself, HERE
These are the Docker Hub autobuild images located here.
POST /raw -d 'Xin chào Việt Nam'
https://link-to-audio-file
POST /json -d 'Xin chào Việt Nam'
{ "url": "https://link-to-audio-file" }
POST /embeded -d 'Xin chào Việt Nam'
<audio controls autoplay><source src="https://link-to-audio-file" type="audio/mpeg"></audio>
Give it a try Oh-my-bed
Env Variable | Mandatory | Default |
---|---|---|
ZALO_AI_API_KEY | yes |
null |
ZALO_SPEAKER_ID | no |
1 |
ZALO_SPEAKER_SPEED | no |
0.8 |
STORAGE_PATH | no |
. |
PUBLIC_PREFIX | no |
http://localhost:8080 |
More at https://zalo.ai/docs/api/text-to-audio-converter
Default production mode
docker run --name tts \
-p 8080:8080 \
-e ZALO_AI_API_KEY=$ZALO_AI_API_KEY \
-e PUBLIC_PREFIX="https://locnh.com/tts-stream" \
-e STORAGE_PATH=/media \
-v /tmp/media:/media \
--restart unless-stopped \
-d locnh/tts:devel
or add -e GIN_MODE=debug
to debug
- Fork me
- Make changes
- Create pull request
- Grab a cup of tee and enjoy