Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
from gtts import gTTS
|
| 2 |
import gradio as gr
|
| 3 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# Function to convert text to speech and save as an audio file
|
| 6 |
def text_to_speech(text, language="hr"):
|
|
@@ -42,8 +49,8 @@ def tts_demo(text, language="hr"):
|
|
| 42 |
# iface.launch()
|
| 43 |
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
|
| 48 |
|
| 49 |
def select_and_speak(state):
|
|
|
|
| 1 |
from gtts import gTTS
|
| 2 |
import gradio as gr
|
| 3 |
import os
|
| 4 |
+
import pygame
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
import random
|
| 11 |
|
| 12 |
# Function to convert text to speech and save as an audio file
|
| 13 |
def text_to_speech(text, language="hr"):
|
|
|
|
| 49 |
# iface.launch()
|
| 50 |
|
| 51 |
|
| 52 |
+
|
| 53 |
+
|
| 54 |
|
| 55 |
|
| 56 |
def select_and_speak(state):
|