Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
from TTS.api import TTS #
|
3 |
|
4 |
# Define paths to the model and configuration
|
5 |
model_path = "best_model.pth" # Directory where your model is saved
|
@@ -10,6 +10,7 @@ tts = TTS(model_path=model_path, config_path=config_path)
|
|
10 |
|
11 |
def generate_speech(text):
|
12 |
# Generate speech using the model
|
|
|
13 |
wav = tts.tts(text)
|
14 |
|
15 |
# Save the generated audio to a temporary file
|
|
|
1 |
import gradio as gr
|
2 |
+
from TTS.api import TTS # Ensure this is the correct import path
|
3 |
|
4 |
# Define paths to the model and configuration
|
5 |
model_path = "best_model.pth" # Directory where your model is saved
|
|
|
10 |
|
11 |
def generate_speech(text):
|
12 |
# Generate speech using the model
|
13 |
+
# Ensure this is the correct method to call
|
14 |
wav = tts.tts(text)
|
15 |
|
16 |
# Save the generated audio to a temporary file
|