Skip to content

fix: preserve fish transcripts without word timestamps - #2391

Closed
nitin4real wants to merge 1 commit into
mainfrom
fix/fish-asr
Closed

nitin4real wants to merge 1 commit into
mainfrom
fix/fish-asr

Conversation

@nitin4real

Copy link
Copy Markdown
Contributor
Screenshot 2026-11-06 at 1 18 04 AM

Guarder tests passed.

Normalize missing word timings to an empty array to prevent TEN schema
rejections. Add native delivery regression tests and use an absolute
test app path.

Validation: 45 unit tests and 12 live ASR guarder tests pass.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

No actionable issues found in the changed code.

ASR design review

  • Lifecycle: N/A (unchanged)
  • Connection state: N/A (unchanged)
  • Buffering: N/A (unchanged)
  • Finalize: N/A (implementation unchanged; delivery test checks result ordering and finalize echo)
  • Reconnect: N/A (unchanged)
  • Result shape: Pass for the changed path; absent or empty word timings now serialize as an array, and the new test covers timed words as well.
  • Metrics: N/A (unchanged)
  • Tests: Pass by inspection for the targeted regression. The PR reports 45 unit tests and 12 live ASR guarder tests passing; I could not independently run them because the standalone TEN runtime dependencies are not installed in this base checkout.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Review

The fix in extension.py:825 is correct. When Fish sends no word timings, the extension now emits words: [] instead of None. That matches the required ASRResult shape in asr_plugin_design_review.md §7.1 and removes the schema rejection. The new test checks the emitted Data JSON end to end (§7.5), covering missing, empty, and timed words. I found no blocking issues.

Minor (test code only)

  • tests/test_result_delivery.py:155-158: lock_buf() is not paired with unlock_buf() in a try/finally. If the slice assignment raises, the frame stays locked and the tester can hang until the 10 s watchdog fires. The guide (line 248) requires finally for this pattern. Following it in the test keeps the example consistent with that rule:
    buffer = frame.lock_buf()
    try:
        buffer[:] = b"\0" * 16000
    finally:
        frame.unlock_buf(buffer)
  • tests/test_result_delivery.py:67-71 and :125-128: if the body raises, the assert not thread.is_alive() inside finally replaces the real exception with a less useful one. Also, apps[0] raises IndexError if run_app failed before appending. Guarding with if apps: and logging instead of asserting in finally would keep the root-cause traceback.

ASR checklist

Item Status
Lifecycle N/A (unchanged)
Connection state N/A
Buffering N/A
Finalize Pass: the test asserts results arrive before asr_finalize_end, and that finalize_id/metadata are echoed unchanged
Reconnect N/A
Result shape Pass: words is now always a list, session_id is under metadata, vendor is under asr_info, and id is stable across interim/final
Metrics N/A
Tests Pass: a native schema-validation regression test was added. The PR states 45 unit tests and 12 guarder tests pass

@nitin4real nitin4real closed this Nov 5, 2026
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.

1 participant