From 66641ac8a25ac3ccd271d9cc082b024ee0df11ea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 29 Nov 2024 05:34:50 +0000 Subject: [PATCH] chore(format): run black on main --- tools/audio/av.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/audio/av.py b/tools/audio/av.py index 333b423d6..cd3a7d66a 100644 --- a/tools/audio/av.py +++ b/tools/audio/av.py @@ -41,11 +41,11 @@ def wav2(i: BytesIO, o: BufferedWriter, format: str): def load_audio( - file: Union[str, BytesIO, Path], - sr: Optional[int] = None, - format: Optional[str] = None, - mono=True, - ) -> Union[np.ndarray, Tuple[np.ndarray, int]]: + file: Union[str, BytesIO, Path], + sr: Optional[int] = None, + format: Optional[str] = None, + mono=True, +) -> Union[np.ndarray, Tuple[np.ndarray, int]]: """ https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI/blob/412a9950a1e371a018c381d1bfb8579c4b0de329/infer/lib/audio.py#L39 """ @@ -113,7 +113,7 @@ def frame_iter(container): np.copyto(decoded_audio[..., offset:end_index], frame_data) offset += len(frame_data[0]) - + container.close() # Truncate the array to the actual size @@ -124,4 +124,4 @@ def frame_iter(container): if sr is not None: return decoded_audio - return decoded_audio, rate \ No newline at end of file + return decoded_audio, rate