We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c592a39 commit 9e5f5edCopy full SHA for 9e5f5ed
my_utils.py
@@ -5,6 +5,7 @@ def load_audio(file,sr):
5
# https://github.com/openai/whisper/blob/main/whisper/audio.py#L26
6
# This launches a subprocess to decode audio while down-mixing and resampling as necessary.
7
# Requires the ffmpeg CLI and `ffmpeg-python` package to be installed.
8
+ file=file.strip(" ").strip('"').strip("\n").strip('"').strip(" ")#防止小白拷路径头尾带了空格和"和回车
9
out, _ = (
10
ffmpeg.input(file, threads=0)
11
.output("-", format="s16le", acodec="pcm_s16le", ac=1, ar=sr)
0 commit comments