Skip to content

Commit

Permalink
Add VAD Unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhant committed Jan 2, 2025
1 parent a423976 commit c82d743
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/espnet2/sds/vad/test_webrtc_vad.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import pytest
import soundfile

from espnet2.sds.vad.webrtc_vad import WebrtcVADModel

pytest.importorskip("webrtcvad")


def test_forward():
vad_model = WebrtcVADModel()
vad_model.warmup()
x, rate = soundfile.read("test_utils/ctc_align_test.wav", dtype="int16")
vad_model.forward(x, rate)
vad_model.forward(x, rate, binary=True)

0 comments on commit c82d743

Please sign in to comment.