From 2d293cafd18ce4c500d949f19ef83c401dcd7dad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 19 Jul 2024 01:23:51 +0900 Subject: [PATCH] chore(format): run black on dev (#591) Co-authored-by: github-actions[bot] --- examples/ipynb/example.ipynb | 2 +- tools/audio/av.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/ipynb/example.ipynb b/examples/ipynb/example.ipynb index ff1e75a..e2aee50 100644 --- a/examples/ipynb/example.ipynb +++ b/examples/ipynb/example.ipynb @@ -284,7 +284,7 @@ "from tools.audio import load_audio\n", "\n", "sample = chat.sample_audio_speaker(load_audio(\"sample.mp3\", 24000))\n", - "print(sample) # save it in order to load the speaker without sample audio next time\n", + "print(sample) # save it in order to load the speaker without sample audio next time\n", "\n", "params_infer_code = ChatTTS.Chat.InferCodeParams(\n", " sample=sample,\n", diff --git a/tools/audio/av.py b/tools/audio/av.py index fe34650..bc96628 100644 --- a/tools/audio/av.py +++ b/tools/audio/av.py @@ -38,6 +38,7 @@ def wav2(i: BytesIO, o: BufferedWriter, format: str): out.close() inp.close() + def load_audio(file: str, sr: int) -> np.ndarray: if not Path(file).exists(): raise FileNotFoundError(f"File not found: {file}")