SOTA Open Source TTS
Update webui.py (#699)
spicysama30e1762594bd
diff --git a/tools/webui.py b/tools/webui.pyindex ef6ae65..c2685f6 100644--- a/tools/webui.py+++ b/tools/webui.py@@ -23,7 +23,7 @@ from fish_speech.i18n import i18nfrom fish_speech.text.chn_text_norm.text import Text as ChnNormedTextfrom fish_speech.utils import autocast_exclude_mps, set_seedfrom tools.api import decode_vq_tokens, encode_reference-from tools.file import AUDIO_EXTENSIONS, list_files+from tools.file import AUDIO_EXTENSIONS, audio_to_bytes, list_files, read_ref_textfrom tools.llama.generate import (GenerateRequest,GenerateResponse,@@ -87,6 +87,7 @@ def build_html_error_message(error):def inference(req: ServeTTSRequest):idstr: str | None = req.reference_id+ prompt_tokens, prompt_texts = [], []if idstr is not None:ref_folder = Path("references") / idstrref_folder.mkdir(parents=True, exist_ok=True)