You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9537678
Browse filesBrowse the repository at this point in the historyBrowse files
feat: return per-segment timestamps from speech2text/transcribe
/v1/infer/speech2text/transcribe returned a single flattened string
(generate_all_text()), silently dropping the segment-level start/end
timestamps that Python's s2t_inference.transcribe_segments() (and the
UI, which iterates d.segments) expects.
Add yu_hailort_s2t_generate_segments() to the shim, wrapping the SDK's
generate_all_segments() and marshaling the result as a JSON array
(reusing the existing escape_json_string() helper already used for
chat message JSON). The Rust wrapper deserializes it into Vec<Segment>
via serde. The route now returns both `segments` (array of
{text,start,end}) and `text` (the segments' text joined with spaces,
kept for callers that only want the flat transcript).
Strengthened the existing #[ignore] real-hw smoke test to assert on
the response shape (data.segments is an array, data.text is a string)
instead of only the HTTP status, so a broken JSON marshal wouldn't
silently pass. Verified against Whisper-Tiny.hef on real Hailo-10H
hardware (all 56 non-hardware tests still pass, clippy clean).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HoKquUKDTB333MNkdBi6uV
0 commit comments