Created
January 16, 2022 07:40
-
-
Save harendra21/57d89e10d60ffd1f463226357aa69ac6 to your computer and use it in GitHub Desktop.
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 | |
file = open("abc.txt", "r").read() | |
speech = gTTS(text=file, lang='en', slow=False) | |
speech.save("voice.mp3") | |
os.system("voice.mp3") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment