Skip to content

Commit

Permalink
chore(format): run black on dev (#827)
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 Dec 3, 2024
1 parent 00c56ee commit d21106f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tools/audio/av.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down Expand Up @@ -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
Expand All @@ -124,4 +124,4 @@ def frame_iter(container):

if sr is not None:
return decoded_audio
return decoded_audio, rate
return decoded_audio, rate

0 comments on commit d21106f

Please sign in to comment.