Skip to content

Instantly share code, notes, and snippets.

@Jackhammer9
Created June 4, 2020 16:26
Show Gist options
  • Save Jackhammer9/31e05d68d046416249a53e7f21e24878 to your computer and use it in GitHub Desktop.
Save Jackhammer9/31e05d68d046416249a53e7f21e24878 to your computer and use it in GitHub Desktop.
from tika import parser
from gtts import gTTS
from playsound import playsound
filename = input ("Please Enter A file name")
file = input("enter file to process")
raw = parser.from_file(file)
text_data = raw['content']
sp = gTTS(text = text_data , lang = 'en')
sp.save(filename)
playsound(filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment