Spaces:
Runtime error
Runtime error
Commit
·
0971fef
1
Parent(s):
0f6e8eb
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import pyttsx3
|
| 3 |
import PyPDF2
|
| 4 |
-
import gTTS
|
| 5 |
|
| 6 |
|
| 7 |
def pdf_to_audio(pdf_file):
|
|
@@ -11,8 +10,8 @@ def pdf_to_audio(pdf_file):
|
|
| 11 |
text += pdf_reader.pages[page].extract_text()
|
| 12 |
|
| 13 |
engine = pyttsx3.init()
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
|
| 18 |
demo = gr.Blocks()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import pyttsx3
|
| 3 |
import PyPDF2
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
def pdf_to_audio(pdf_file):
|
|
|
|
| 10 |
text += pdf_reader.pages[page].extract_text()
|
| 11 |
|
| 12 |
engine = pyttsx3.init()
|
| 13 |
+
engine.say(text)
|
| 14 |
+
engine.runAndWait()
|
| 15 |
|
| 16 |
|
| 17 |
demo = gr.Blocks()
|