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 # Ensure this is
|
| 3 |
|
| 4 |
# Define paths to the model and configuration
|
| 5 |
model_path = "best_model.pth" # Directory where your model is saved
|
|
@@ -10,8 +10,8 @@ tts = TTS(model_path=model_path, config_path=config_path)
|
|
| 10 |
|
| 11 |
def generate_speech(text):
|
| 12 |
# Generate speech using the model
|
| 13 |
-
#
|
| 14 |
-
wav = tts.tts(text)
|
| 15 |
|
| 16 |
# Save the generated audio to a temporary file
|
| 17 |
audio_path = "output.wav"
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from TTS.api import TTS # Ensure this import path is correct
|
| 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 |
+
# Adjust based on the correct method for generating speech
|
| 14 |
+
wav = tts.tts(text) # Ensure this is the correct method for your version
|
| 15 |
|
| 16 |
# Save the generated audio to a temporary file
|
| 17 |
audio_path = "output.wav"
|