Integrate gain_chk, per-band gain verification tool, into STL #179
Open
TomV76 wants to merge 6 commits into
Open
Integrate gain_chk, per-band gain verification tool, into STL #179TomV76 wants to merge 6 commits into
TomV76 wants to merge 6 commits into
Conversation
… the STL build; add regression tests under src/gain_chk/test_data and README for build/ctest usage.
… algorithm, command line syntax, and implementation. Integrate the new chapter into the STL manual.
…djusted equation formatting for clarity and added gain_chk.tex to the build process.
Add .gitattributes with eol=native for .ref files so they are checked out with platform-native line endings, matching gain_chk stderr output. Normalize stored ref files to LF.
- Move chapter after freqresp (spectral analysis tools grouped together) - Add labels to chapter and all sections for cross-referencing - Add output file format subsection describing -t results structure - Add usage examples with sample output and threshold check - Fix data format description (remove incorrect endianness wording)
Member
|
Thanks @TomV76 for the tool. CTest fails on MacOS (and most likely Linux) because of CRLF line endings in the reference files. I assume they have been generated on Windows. The fix is to let Git update the reference file automatically according to the platform it checks out (see .gitattributes). I have also updated the documentation with more details on the output file and usage to match the other sections of the manual, added links and moved the section just after freqresp. I have submitted a PR on your project with the proposed changes for your consideration: TomV76#1 |
Pr 179 fixes CRLF and improves doc. Thanks to @ludomal
Author
|
Thanks for the corrections and improvments @ludomal , I accepted your PR. |
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.
Summary
This PR adds gain_chk, a command-line tool for per-band gain verification between a reference and a processed 16-bit PCM stream. It is intended for codec and speech-processing validation workflows aligned with ITU-T G.191-style tooling.
The tool analyzes audio in 20 ms frames, performs short-time spectral analysis, and reports energy ratios (dB and %) per frequency band. Optional VAD input splits statistics into active/inactive frames; optional threshold flags (-a, -s) provide a numeric exit code for automated pass/fail in scripts.
What's included
gain_chk source (src/gain_chk/gain_chk.c)
CMake target integrated into the top-level STL build (gain_chk → build/bin/gain_chk)
5 CTest regression cases (gain_chk_self, gain_chk_a–d) with bundled PCM and golden stderr references
README.md with build and test instructions; release notes for revision history