Spaces:
Runtime error
Runtime error
John Langley
commited on
Commit
•
a1b2bae
1
Parent(s):
7e16289
trying things with cpu
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ from huggingface_hub import hf_hub_download
|
|
34 |
from llama_cpp import Llama
|
35 |
from TTS.api import TTS
|
36 |
from TTS.utils.manage import ModelManager
|
37 |
-
|
38 |
#from TTS.tts.models.xtts import Xtts
|
39 |
#from TTS.utils.generic_utils import get_user_data_dir
|
40 |
#from TTS.utils.manage import ModelManager
|
@@ -154,7 +154,7 @@ with gr.Blocks(title="Voice chat with LLM") as demo:
|
|
154 |
def handle_speech_generation(sentence, chatbot_history, chatbot_voice):
|
155 |
if sentence != "":
|
156 |
print("Processing sentence")
|
157 |
-
generated_speech = generate_speech_for_sentence(chatbot_history, chatbot_voice, sentence, xtts_model,
|
158 |
if generated_speech is not None:
|
159 |
_, audio_dict = generated_speech
|
160 |
yield (sentence, chatbot_history, audio_dict["value"])
|
|
|
34 |
from llama_cpp import Llama
|
35 |
from TTS.api import TTS
|
36 |
from TTS.utils.manage import ModelManager
|
37 |
+
from TTS.tts.configs.xtts_config import XttsConfig
|
38 |
#from TTS.tts.models.xtts import Xtts
|
39 |
#from TTS.utils.generic_utils import get_user_data_dir
|
40 |
#from TTS.utils.manage import ModelManager
|
|
|
154 |
def handle_speech_generation(sentence, chatbot_history, chatbot_voice):
|
155 |
if sentence != "":
|
156 |
print("Processing sentence")
|
157 |
+
generated_speech = generate_speech_for_sentence(chatbot_history, chatbot_voice, sentence, xtts_model, None, return_as_byte=True)
|
158 |
if generated_speech is not None:
|
159 |
_, audio_dict = generated_speech
|
160 |
yield (sentence, chatbot_history, audio_dict["value"])
|