chore(format): run black on dev (#591)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-07-19 01:23:51 +09:00
committed by GitHub
parent b4da2375ea
commit 2d293cafd1
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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",
+1
View File
@@ -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}")