mirror of
https://github.com/2noise/ChatTTS.git
synced 2026-08-29 02:10:59 +08:00
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:
committed by
GitHub
parent
b4da2375ea
commit
2d293cafd1
Vendored
+1
-1
@@ -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",
|
||||
|
||||
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user