tests: cover audio buffer decoding#3911
Open
jamesachurchill wants to merge 1 commit into
Open
Conversation
danbev
approved these changes
Jun 26, 2026
| target_compile_definitions(${AUDIO_BUFFER_TEST} PRIVATE | ||
| SAMPLE_PATH="${PROJECT_SOURCE_DIR}/samples/jfk.wav") | ||
| add_test(NAME ${AUDIO_BUFFER_TEST} COMMAND ${AUDIO_BUFFER_TEST}) | ||
| set_tests_properties(${AUDIO_BUFFER_TEST} PROPERTIES LABELS "unit") |
Member
There was a problem hiding this comment.
Should this be run in CI? (it would need to have the gh label if so):
Suggested change
| set_tests_properties(${AUDIO_BUFFER_TEST} PROPERTIES LABELS "unit") | |
| set_tests_properties(${AUDIO_BUFFER_TEST} PROPERTIES LABELS "unit;gh") |
With that change it should have both labels:
$ cmake --workflow --preset cpu-debug
$ ctest --test-dir build-cpu-debug/ -R test-read-audio-data-buffer --output-on-failure --print-labels
Internal ctest changing into directory: /home/danbev/work/ai/whisper-work/build-cpu-debug
Test project /home/danbev/work/ai/whisper-work/build-cpu-debug
All Labels:
gh
unit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a small regression test for the in-memory audio decoding path used by server multipart uploads without ffmpeg conversion.
The test reads samples/jfk.wav into a byte buffer, decodes it through read_audio_data(const char *, size_t, ...), decodes the same sample through the existing filename path, and asserts the PCM outputs match.
This covers the core regression behind #3819 without requiring a server lifecycle, network harness, ffmpeg, or model download.
Local verification on aarch64:
Result: 100% tests passed.