feat: add six-line caption cap and enforce 3s minimum final timeout
- Reduce default overlay-final-timeout from 4s to 3s and validate that non-zero timeout is at least 3s to prevent captions from disappearing too quickly. - Limit completed captions to six lines and keep each visible for at least 3s, improving readability during fast speech. - Update README to document new VAD behavior and changed defaults.
This commit is contained in:
@@ -130,8 +130,9 @@ func validatePaths(modelsDir string, mode config.Mode) (modelPaths, error) {
|
||||
func newVAD(model string, threads int) *sherpa.VoiceActivityDetector {
|
||||
return sherpa.NewVoiceActivityDetector(&sherpa.VadModelConfig{
|
||||
SileroVad: sherpa.SileroVadModelConfig{
|
||||
Model: model,
|
||||
Threshold: 0.5,
|
||||
Model: model,
|
||||
Threshold: 0.5,
|
||||
// A 500 ms pause ends the current caption line and starts the next one.
|
||||
MinSilenceDuration: 0.5,
|
||||
MinSpeechDuration: 0.25,
|
||||
WindowSize: 512,
|
||||
|
||||
Reference in New Issue
Block a user