gpt4 book ai didi

python pydub.silence split_on_silence 返回 0 block

转载 作者:行者123 更新时间:2023-12-04 08:06:46 36 4
gpt4 key购买 nike

我正在使用 split_on_silence 带有参数的函数,如下面的python方法所示。
我没有得到任何单一的返回。块长度为 0。
我做错了什么?

from pydub import AudioSegment 
from pydub.silence import split_on_silence

song = AudioSegment.from_wav(my_file)

# split track where silence is 0.5 seconds
# or more and get chunks
chunks = split_on_silence(song,
# must be silent for at least 0.5 seconds
# or 500 ms. adjust this value based on user
# requirement. if the speaker stays silent for
# longer, increase this value. else, decrease it.
min_silence_len = 500,

# consider it silent if quieter than -16 dBFS
# adjust this per requirement
silence_thresh = -16
)

最佳答案

song.dBFS
-22.4691372540001

silence_thresh - (in dBFS) anything quieter than this will be considered silence.Notice the average loudness of the sound is -22.4 dBFS (quieter than
the default silence_thresh of -16dBFS).
更改 silence_thresh = -23 的值.
[来自 silence_thresh = -21 ]。检查 this欲知更多详情

关于python pydub.silence split_on_silence 返回 0 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66189077/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com