John Langley commited on
Commit
a1b2bae
1 Parent(s): 7e16289

trying things with cpu

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- #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,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, xtts_supported_languages=config.languages, return_as_byte=True)
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"])