Skip to content

Instantly share code, notes, and snippets.

@PratyushMishra02
Created June 21, 2020 09:08
Show Gist options
  • Save PratyushMishra02/649dceb4927d2dd69cd9b571dfe4a83a to your computer and use it in GitHub Desktop.
Save PratyushMishra02/649dceb4927d2dd69cd9b571dfe4a83a to your computer and use it in GitHub Desktop.
#Import
from gtts import gTTS
import os
#txt file
f=open('1.txt')
x=f.read()
language='en'
#audio
audio=gTTS(text=x,lang=language,slow=False)
audio.save("1.wav")
os.system("1.wav")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment