-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
采集音频时延长说话停顿时间 #5
Comments
With the default Silero v4 model and frameSamples=1536, one frame equals 96ms (at 16kHz sample rate). For Silero VAD v5 model, frameSamples must be 512, making one frame 32ms. Parameters explained: English:
To extend pause detection time, increase redemptionFrames. For example, setting it to 16 would require 1.536 seconds of silence before stopping. Translation -
要延长暂停检测时间,增加redemptionFrames的值。例如,设置为16会要求1.536秒的静音才会停止。 |
你好,我再问一下,比如,我在说类似这样的一段话:“你好,我想去机场,怎么坐地铁”,目前我使用的时候,等说完“你好”两个字的时候,中间稍微停顿了1秒左右,它立马就结束检测了,我想延长一下声音检测停顿的这个时间到2秒左右,等全部说完这一段话的时候再一起停止,这个有可以控制的参数吗?
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: Keyur Maru ***@***.***>
发送时间: 2025年1月25日 19:43
收件人: keyur2maru/vad ***@***.***>
抄送: fuyud ***@***.***>, Author ***@***.***>
主题: Re: [keyur2maru/vad] 采集音频时延长说话停顿时间 (Issue #5)
|
redemptionFrames 控制的就是VAD在检测到静音后,需要等待多长时间才判定语音真正结束。 以你的例子 "你好 (停顿) 我想去机场,怎么坐地铁": 默认设置下(redemptionFrames = 8):
要延长到2秒,需要增加redemptionFrames:
所以你可以这样设置: vadHandler.startListening(
redemptionFrames: 21 // 这样会在检测到约2秒的静音后才停止
); 这样设置后,即使在说话中间有短暂停顿,也能继续录音直到整句话说完。 |
感谢你不厌其烦的耐心讲解,因为我刚开始做flutter,所以有些还是很生疏,如果能加到你的联系方式,我将不胜荣幸我想感谢下你,支持下开源项目
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: Keyur Maru ***@***.***>
发送时间: 2025年1月25日 19:58
收件人: keyur2maru/vad ***@***.***>
抄送: fuyud ***@***.***>, Author ***@***.***>
主题: Re: [keyur2maru/vad] 采集音频时延长说话停顿时间 (Issue #5)
redemptionFrames 控制的就是VAD在检测到静音后,需要等待多长时间才判定语音真正结束。
以你的例子 "你好 (停顿) 我想去机场,怎么坐地铁":
默认设置下(redemptionFrames = 8):
每帧时长是96毫秒(使用默认frameSamples=1536时)
8帧 = 8 * 96毫秒 = 768毫秒(约0.77秒)
所以如果停顿超过0.77秒,就会停止录音
要延长到2秒,需要增加redemptionFrames:
2秒 = 2000毫秒
2000毫秒 ÷ 96毫秒 = 大约21帧
所以你可以这样设置:
vadHandler.startListening( redemptionFrames: 21 // 这样会在检测到约2秒的静音后才停止 );
这样设置后,即使在说话中间有短暂停顿,也能继续录音直到整句话说完。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
void startListening({
double positiveSpeechThreshold = 0.5,
double negativeSpeechThreshold = 0.35,
int preSpeechPadFrames = 1,
int redemptionFrames = 8,
int frameSamples = 1536,
int minSpeechFrames = 3,
bool submitUserSpeechOnPause = false,
});
这些参数分别有什么用呢,
我想设置采集音频时延长说话停顿时间,让它能采集更多音频后再停顿
The text was updated successfully, but these errors were encountered: