mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-23 20:11:07 +00:00
Added "TTS - Text to Speech Mp3" (#248)
* New commit * Added example file (run.py) * New commit * Added 'TTS - Text to Speech Mp3'
This commit is contained in:
parent
bba0512e1c
commit
1d2de84900
|
@ -63,6 +63,7 @@ So far, the following projects have been integrated to this repo:
|
||||||
|[SMS your location](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/SmsYourLocation)|[prince]()|
|
|[SMS your location](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/SmsYourLocation)|[prince]()|
|
||||||
|[Squid installer for Ubuntu](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Squid-Proxy-Installer-for-Ubuntu16)|[Berkay Demir]()|
|
|[Squid installer for Ubuntu](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Squid-Proxy-Installer-for-Ubuntu16)|[Berkay Demir]()|
|
||||||
|[Subtitle downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Subtitle-downloader)|[Kaushlendra Pratap](https://github.com/kaushl1998)|
|
|[Subtitle downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Subtitle-downloader)|[Kaushlendra Pratap](https://github.com/kaushl1998)|
|
||||||
|
|[TTS - Text to Speech Mp3](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/TTS_Text_to_Speech_Mp3)|[Antonio Andrade](https://github.com/xAndrade)|
|
||||||
|[Top_News](Top_News)|[Attupatil](https://github.com/Attupatil)|
|
|[Top_News](Top_News)|[Attupatil](https://github.com/Attupatil)|
|
||||||
|[Take Screenshot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Take_screenshot)|[Moad Mohammed Elhebri](https://github.com/moadmmh)|
|
|[Take Screenshot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Take_screenshot)|[Moad Mohammed Elhebri](https://github.com/moadmmh)|
|
||||||
|[To Do Bot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/To-Do-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)|
|
|[To Do Bot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/To-Do-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)|
|
||||||
|
|
20
TTS_Text_to_Speech_Mp3/README.md
Normal file
20
TTS_Text_to_Speech_Mp3/README.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# TTS - Text to Speech Mp3
|
||||||
|
|
||||||
|
Write spoken mp3 data to a file, a file-like object (bytestring) for further audio manipulation, or stdout.
|
||||||
|
This example uses the Python library [gTTS](https://pypi.org/project/gTTS/) (Google Text-to-Speech), to interface with Google Translate's text-to-speech API.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
``$ pip install requirements.txt``
|
||||||
|
|
||||||
|
## Quickstart
|
||||||
|
|
||||||
|
```
|
||||||
|
>>> from gtts import gTTS
|
||||||
|
>>> tts = gTTS('hello')
|
||||||
|
>>> tts.save('hello.mp3')
|
||||||
|
```
|
||||||
|
|
||||||
|
## Disclaimer
|
||||||
|
|
||||||
|
[gTTS](https://pypi.org/project/gTTS/) project is not affiliated with Google or Google Cloud. Breaking upstream changes can occur without notice. This project is leveraging the undocumented Google Translate speech functionality and is different from Google Cloud Text-to-Speech.
|
1
TTS_Text_to_Speech_Mp3/requirements.txt
Normal file
1
TTS_Text_to_Speech_Mp3/requirements.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
gTTS
|
8
TTS_Text_to_Speech_Mp3/run.py
Normal file
8
TTS_Text_to_Speech_Mp3/run.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
from gtts import gTTS
|
||||||
|
|
||||||
|
def main():
|
||||||
|
tts = gTTS('hello')
|
||||||
|
tts.save('hello.mp3')
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in New Issue
Block a user