Skip to content

Fix multiple issues with ASR-results writing - #678

Merged
curufinwe merged 2 commits into
mainfrom
fix-asr-results-roundtrip
Nov 6, 2026
Merged

curufinwe merged 2 commits into
mainfrom
fix-asr-results-roundtrip

Conversation

@curufinwe

Copy link
Copy Markdown
Contributor
  • write_asr_results dropped the type discriminator for records built in Python (it was only a default, so exclude_unset removed it), so parse_asr_results could not read the file back. type is now always written. Output for records that already carried type is unchanged byte for byte.
  • parse_asr_results raised TypeError when several alternatives of a segment had no n_best_index, or only some did. Segments without an index now sort first, in input order.
  • Within one results file, a speaker id must always come with the same name and gender. stream_asr_results, parse_asr_results and write_asr_results raise ValueError otherwise.
  • A recording name that appears again later in a file is merged into the first BatchRecording of that name. A different path raises ValueError.
  • Adds tests/lib to the CI test matrix, so these tests actually run.

No i6_core job uses this module, so no hashes are affected.

🤖 Generated with Claude Code

curufinwe and others added 2 commits November 5, 2026 13:56
…nsistency, merge recording revisits

- write_asr_results: always write the `type` discriminator, so results built
  in Python can be parsed back. Output for records that already carried
  `type` is unchanged byte for byte.
- parse_asr_results: sort segments without n_best_index first (stable)
  instead of raising TypeError.
- A speaker id must always come with the same name and gender within one
  results file; stream/parse/write raise ValueError otherwise.
- parse_asr_results merges a recording name that appears again into the
  first BatchRecording of that name; a different path raises ValueError.
- Run tests/lib in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without it, pytest's rootdir-based import puts tests/lib/ itself on
sys.path instead of the directory containing the i6_core checkout, so
collecting tests/lib/test_asr_results.py fails with
ModuleNotFoundError: No module named 'i6_core'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@curufinwe curufinwe changed the title asr_results: fix write→parse round trip and missing n_best_index; enforce one speaker per id; merge repeated recordings Fix multiple issues with ASR-results writing Nov 6, 2026
@curufinwe
curufinwe merged commit 7b23d79 into main Nov 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants