Skip to content

Commit

Permalink
Update my_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RVC-Boss authored Apr 9, 2023
1 parent c592a39 commit 9e5f5ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions my_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ def load_audio(file,sr):
# https://github.com/openai/whisper/blob/main/whisper/audio.py#L26
# This launches a subprocess to decode audio while down-mixing and resampling as necessary.
# Requires the ffmpeg CLI and `ffmpeg-python` package to be installed.
file=file.strip(" ").strip('"').strip("\n").strip('"').strip(" ")#防止小白拷路径头尾带了空格和"和回车
out, _ = (
ffmpeg.input(file, threads=0)
.output("-", format="s16le", acodec="pcm_s16le", ac=1, ar=sr)
Expand Down

0 comments on commit 9e5f5ed

Please sign in to comment.