Skip to content

Commit

Permalink
chore(format): run black on dev (2noise#591)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Jul 18, 2024
1 parent b4da237 commit 2d293ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/ipynb/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions tools/audio/av.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 2d293ca

Please sign in to comment.