Created
March 19, 2020 10:48
-
-
Save asadamatic/46904c7ea2ee1fe9bb0c53e6d071477c to your computer and use it in GitHub Desktop.
A python program that converts a text message to audio, saves it and plays it using default audio player.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gtts import gTTS | |
import os | |
message = 'Hello Asad!' | |
output = gTTS(text = message, lang= 'en', slow = False) | |
output.save('sayHello.mp3') | |
os.system('start sayHello.mp3') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment