Skip to content
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

ADD SileroVAD #1144

Closed
kyakuno opened this issue May 28, 2023 · 4 comments
Closed

ADD SileroVAD #1144

kyakuno opened this issue May 28, 2023 · 4 comments
Assignees

Comments

@kyakuno
Copy link
Collaborator

kyakuno commented May 28, 2023

https://github.com/snakers4/silero-vad

@kyakuno
Copy link
Collaborator Author

kyakuno commented May 28, 2023

voice activity detection。webrtc vadよりも高性能らしい。
openai/whisper#29

@kyakuno
Copy link
Collaborator Author

kyakuno commented Jun 2, 2023

リポジトリにONNXファイルが含まれている。

@kyakuno kyakuno self-assigned this Jun 3, 2023
@kyakuno
Copy link
Collaborator Author

kyakuno commented Jun 3, 2023

SileroVADの処理フロー

入力された音声をモノラルの16kHzに変換
PCMのレンジは+-1.0

waveを1536サンプルごとのチャンクに分割
onnxのinputにpcm、hとcにステート、srにサンプリングレートを入力
推論結果はspeech_prob, h, c

speech_probはchunkの無音でない確率が入る
hとcはステートとして次のチャンクに供給する

hとcのステートは初期値0、(2, batch, 64)次元

@kyakuno
Copy link
Collaborator Author

kyakuno commented Jun 3, 2023

get_speech_timestampsでは、threshold = 0.5以上で無音でないと判定している。
250ms以上、有音区間が続いた場合は有音としている。
100ms以上、無音区間が続いた場合は無音としている。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant