Skip to content

Commit

Permalink
Merge pull request #30 from kaminn/faster-whisper-vad
Browse files Browse the repository at this point in the history
faster-whisper vad support
  • Loading branch information
abdeladim-s committed May 2, 2023
2 parents 32fdec7 + fe509e9 commit 8f236c5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,5 @@ dmypy.json

.idea
_docs
assets
assets
.vscode
19 changes: 19 additions & 0 deletions src/subsai/models/faster_whisper_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,25 @@ class FasterWhisperModel(AbstractModel):
'options': None,
'default': "\"'.。,,!!??::”)]}、"
},
'vad_filter': {
'type': bool,
'description': 'If True, use the integrated Silero VAD model to filter out parts of the audio without speech.',
'options': None,
'default': False
},
'vad_parameters': {
'type': dict,
'description': 'Parameters for splitting long audios into speech chunks using silero VAD.',
'options': None,
'default': {
'threshold': 0.5,
'min_speech_duration_ms': 250,
'max_speech_duration_s': float('inf'),
'min_silence_duration_ms': 2000,
'window_size_samples': 1024,
'speech_pad_ms': 400
}
},
}

def __init__(self, model_config):
Expand Down

0 comments on commit 8f236c5

Please sign in to comment.