Created
January 21, 2021 23:26
-
-
Save salma71/60569db5aaceaf74f8e84f301a43201c 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 | |
from pdfminer.high_level import extract_text | |
def pdf_to_text(file_obj): | |
text = extract_text(file_obj.name) | |
myobj = gTTS(text=text, lang='en', slow=False) | |
myobj.save("test.wav") | |
return 'test.wav' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment