Skip to content

Instantly share code, notes, and snippets.

@harendra21
Created January 16, 2022 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harendra21/57d89e10d60ffd1f463226357aa69ac6 to your computer and use it in GitHub Desktop.
Save harendra21/57d89e10d60ffd1f463226357aa69ac6 to your computer and use it in GitHub Desktop.
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