https://github.com/marcus67/python_google_speak
Python module that uses a Google Translate online web service to convert short texts into high quality MP3 tracks
https://github.com/marcus67/python_google_speak
Last synced: about 1 year ago
JSON representation
Python module that uses a Google Translate online web service to convert short texts into high quality MP3 tracks
- Host: GitHub
- URL: https://github.com/marcus67/python_google_speak
- Owner: marcus67
- License: gpl-3.0
- Created: 2018-09-17T20:43:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-26T00:09:29.000Z (over 1 year ago)
- Last Synced: 2025-03-19T02:38:31.652Z (about 1 year ago)
- Language: Python
- Size: 77.1 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# python_google_speak
This is a little Python module that uses a Google Translate online web service to convert short
texts into high quality MP3 tracks.
## Source Repository ##
See https://github.com/marcus67/python_google_speak
## CircleCI Continuous Integration Status
## GitHub Status
from python_google_speak import speech_generator
from python_google_speak import speech_output
sound_generator = speech_generator.SpeechGenerator(p_locale="en_US")
sound_data = sound_generator.generate_audio_data("hello.")
speech_output.playback_audio_data(sound_data)
## Caveats ##
* Google limits the length of the text to a few hundred characters.
* The library `playsound` which is used by `speech_output` has issues when called from within
a virtual environment.
## Command Line Interface
The tool can be called from the command line as follows:
# To output to the standard audio device:
> google_speak --locale "en_US" "hello!"
# To write audio data to a file
> google_speak --locale "en_US" --outfile "hello.mp3" "hello!"