Skip to content

Commit

Permalink
Update webui.py (#699)
Browse files Browse the repository at this point in the history
* Update webui.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
AnyaCoder and pre-commit-ci[bot] authored Dec 3, 2024
1 parent 64ae771 commit 30e1762
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from fish_speech.text.chn_text_norm.text import Text as ChnNormedText
from fish_speech.utils import autocast_exclude_mps, set_seed
from 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_text
from tools.llama.generate import (
GenerateRequest,
GenerateResponse,
Expand Down Expand Up @@ -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") / idstr
ref_folder.mkdir(parents=True, exist_ok=True)
Expand Down

0 comments on commit 30e1762

Please sign in to comment.