Giter Site home page Giter Site logo

nguyenlamzx / google-translate-tts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hungtruong/google-translate-tts

0.0 1.0 0.0 166 KB

A python script for using Google's undocumented TTS api to save text to an MP3 file.

License: MIT License

Python 100.00%

google-translate-tts's Introduction

Google-Translate-TTS

A python script for using Google's undocumented TTS api to save text to an MP3 file.

For more background, check out this blog post.

Usage

Either 1/ on the command line, or 2/ as a function

1/ Command line

GoogleTTS.py [-h] [-o [OUTPUT]] [-l [LANGUAGE]]
                    (-f FILE | -s STRING [STRING ...])

Google TTS Downloader.

optional arguments:
  -h, --help            show this help message and exit
  -o [OUTPUT], --output [OUTPUT]
                        Filename to output audio to
  -l [LANGUAGE], --language [LANGUAGE]
                        Language to output text to.
  -f FILE, --file FILE  File to read text from.
  -s STRING [STRING ...], --string STRING [STRING ...]
                        A string of text to convert to speech.

Examples

To convert text from a file:

GoogleTTS.py -f text.txt

To convert text from the commandline to a named file:

GoogleTTS.py -l ja -o konnichiwa_bitches.mp3 -s こんにちは

2/ Function

or we can call

audio_extract(input_text='tunnel snakes rule apparently', args = {'language':'en','output':'outputto.mp3'})

Remember

Don't be evil.

google-translate-tts's People

Contributors

hungtruong avatar tburette avatar

Watchers

Lam Nguyen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.