zsolnai commited on
Commit ·
d6fb39f
1
Parent(s): f9adb0f
Break up tts logic
Browse files
app.py
CHANGED
|
@@ -18,9 +18,12 @@ from TTS.api import TTS
|
|
| 18 |
|
| 19 |
# Using a standard, high-quality English Tacotron2 model
|
| 20 |
TTS_MODEL_NAME = "tts_models/en/ljspeech/tacotron2-DDC"
|
| 21 |
-
tts_model = TTS(model_name=TTS_MODEL_NAME, progress_bar=False).to(device)
|
| 22 |
OUTPUT_WAV_FILE = "output.wav"
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
def speech_to_text(audio_file_path):
|
| 26 |
"""Performs Speech-to-Text using the Whisper model."""
|
|
|
|
| 18 |
|
| 19 |
# Using a standard, high-quality English Tacotron2 model
|
| 20 |
TTS_MODEL_NAME = "tts_models/en/ljspeech/tacotron2-DDC"
|
|
|
|
| 21 |
OUTPUT_WAV_FILE = "output.wav"
|
| 22 |
|
| 23 |
+
tts_model = TTS(model_name=TTS_MODEL_NAME, progress_bar=False)
|
| 24 |
+
|
| 25 |
+
tts_model.to(device)
|
| 26 |
+
|
| 27 |
|
| 28 |
def speech_to_text(audio_file_path):
|
| 29 |
"""Performs Speech-to-Text using the Whisper model."""
|