Skip to content
/ tts Public

A small app is written in Go to simplify Zalo TTS integration.

License

Notifications You must be signed in to change notification settings

locnh/tts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Tiny Zalo TTS wrapper

A small app written in golang to simplify Zalo TTS integration.

Try it yourself, HERE

These are the Docker Hub autobuild images located here.

License Build Status Docker Image Size (latest semver) Docker Image Version (latest semver) Docker

Fearure

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>

Demo

Give it a try Oh-my-bed

Usage

Parameters

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

Run a Docker container

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

Contribute

  1. Fork me
  2. Make changes
  3. Create pull request
  4. Grab a cup of tee and enjoy

About

A small app is written in Go to simplify Zalo TTS integration.

Resources

License

Stars

Watchers

Forks

Packages

No packages published