Skip to content
Snippets Groups Projects
Commit d8f7b5fe authored by Andres Marafioti's avatar Andres Marafioti
Browse files

debug

parent 7b0da097
Branches
No related tags found
No related merge requests found
......@@ -53,11 +53,14 @@ class MeloTTSHandler(BaseHandler):
_ = self.model.tts_to_file("text", self.speaker_id, quiet=True)
def process(self, llm_sentence):
console.print(f"[green]ASSISTANT: {llm_sentence}")
language_id = None
if isinstance(llm_sentence, tuple):
print("llm sentence is tuple!")
llm_sentence, language_id = llm_sentence
console.print(f"[green]ASSISTANT: {llm_sentence}")
if language_id is not None and self.language != language_id:
self.model = TTS(language=WHISPER_LANGUAGE_TO_MELO_LANGUAGE[self.language], device=self.device)
self.speaker_id = self.model.hps.data.spk2id[WHISPER_LANGUAGE_TO_MELO_SPEAKER[self.language]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment