mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-04 09:29:22 +08:00
Merge pull request #553 from EarningsCall/master
Improve documentation.
This commit is contained in:
12
README.md
12
README.md
@@ -66,7 +66,11 @@ If you are planning to run the VAD using solely the `onnx-runtime`, it will run
|
||||
from silero_vad import load_silero_vad, read_audio, get_speech_timestamps
|
||||
model = load_silero_vad()
|
||||
wav = read_audio('path_to_audio_file')
|
||||
speech_timestamps = get_speech_timestamps(wav, model)
|
||||
speech_timestamps = get_speech_timestamps(
|
||||
wav,
|
||||
model,
|
||||
return_seconds=True, # Return speech timestamps in seconds (default is samples)
|
||||
)
|
||||
```
|
||||
|
||||
**Using torch.hub**:
|
||||
@@ -78,7 +82,11 @@ model, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad', model='silero_v
|
||||
(get_speech_timestamps, _, read_audio, _, _) = utils
|
||||
|
||||
wav = read_audio('path_to_audio_file')
|
||||
speech_timestamps = get_speech_timestamps(wav, model)
|
||||
speech_timestamps = get_speech_timestamps(
|
||||
wav,
|
||||
model,
|
||||
return_seconds=True, # Return speech timestamps in seconds (default is samples)
|
||||
)
|
||||
```
|
||||
|
||||
<br/>
|
||||
|
||||
Reference in New Issue
Block a user