diff --git a/tests/Makefile.am b/tests/Makefile.am index 22cad98f..d2a79120 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,7 @@ # Tests Makefile.am for utun - all tests with new ll_queue library +EXTRA_DIST = data/silero_speech.pcm data/silero_speech.txt + # All available tests (check_PROGRAMS runs via automake check-TESTS) check_PROGRAMS = \ test_ll_queue \ @@ -560,7 +562,7 @@ test_radio_vad_SOURCES = test_radio_vad.c test_radio_vad_LDADD = -lm test_silero_vad_SOURCES = test_silero_vad.c -test_silero_vad_CFLAGS = -I$(top_srcdir)/lib +test_silero_vad_CFLAGS = -I$(top_srcdir)/lib -DTEST_SILERO_SPEECH_PATH='"$(srcdir)/data/silero_speech.pcm"' test_silero_vad_LDADD = $(COMMON_LIBS) @SILERO_VAD_LIBS@ test_speex_aec_SOURCES = test_speex_aec.c diff --git a/tests/data/silero_speech.pcm b/tests/data/silero_speech.pcm new file mode 100644 index 00000000..cea13891 Binary files /dev/null and b/tests/data/silero_speech.pcm differ diff --git a/tests/data/silero_speech.txt b/tests/data/silero_speech.txt new file mode 100644 index 00000000..b69c3e98 --- /dev/null +++ b/tests/data/silero_speech.txt @@ -0,0 +1,12 @@ +silero_speech.pcm — синтезированная речь для регрессии Silero VAD. +Формат: mono, 16000 Hz, signed int16 little endian; 16384 отсчёта (32 окна по 512). +Фраза: "This is a speech recognition test. The radio should start transmitting when I speak. One two three four five." +Источник: встроенный синтезатор flite в FFmpeg, голос по умолчанию (kal). +Файл хранится в репозитории; FFmpeg/flite при запуске теста не требуются. + +Воспроизведение файла: +ffmpeg -f s16le -ar 16000 -ac 1 -i silero_speech.pcm silero_speech.wav + +Генерация исходного сигнала: +ffmpeg -f lavfi -i "flite=text='This is a speech recognition test. The radio should start transmitting when I speak. One two three four five.'" -ar 16000 -ac 1 -f s16le speech_full.pcm +silero_speech.pcm содержит первые 32768 байт speech_full.pcm.