Skip to content

convert subtitle (.srt) to speech (.wav) using google API

License

Notifications You must be signed in to change notification settings

afigar/subtitle_to_speech

 
 

Repository files navigation

subtitle to speech

What is it ?

This tool help you to convert subtitle (.srt) to audio file (.wav and .ogg). As the tool is based on Docker, it is OS independant :)

It uses Google text to speech API, mpg123 and sox

build it

docker build . -t tts

convert all srt files that we can find in ./data directory

docker run -v $(pwd)/data:/data -it tts

convert only file data/test.srt to audio using autralian accent, a little bit faster, and save it to a different filename

docker run -v $(pwd)/data:/data -it tts --srt-file test.srt --lang en-au --tempo 1.35 --outfilename test-au

Choosing your languages

A subtitle file is read by default in english. To choose an other language, juste specify in the filename following filename.[language key].srt where [language key] can be fr (french), en, es (spanish), zh-CN (chinese), ... Complete list can be found here

About

convert subtitle (.srt) to speech (.wav) using google API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.0%
  • Dockerfile 8.0%