DEV Community

Discussion on: Convert any .pdf file 📚 into an audio 🔈 book with Python

Collapse
 
mustafaanaskh99 profile image
Mustafa Anas

Run this code and hear the result

from gtts import gTTS
final_file = gTTS(text='Demo String', lang='en')  # store file in variable
final_file.save("Generated Speech.mp3")  # save file to computer