LocalAI/core
LocalAI [bot] 595b6fd22d
feat(api/transcription): include segments + duration + language on stream done event (#9709)
streamTranscription previously emitted a done event with just `text`,
matching the OpenAI streaming spec exactly. Streaming clients that need
per-utterance timings or audio duration had to fall back to the
non-streaming JSON path — and that path is exactly the one that trips
on ResponseHeaderTimeout when whisper requests queue behind each other
on a SingleThread backend.

Extend the done event to additively carry `language`, `duration`, and
a `segments` array (id, start, end, text — start/end as float seconds,
matching TranscriptionSegmentSeconds). Empty / zero values are still
omitted; spec-compliant clients ignore the new fields.

This unblocks notary's streaming Transcribe (companion change in the
notary repo) so it produces the same TranscriptionResult shape as the
JSON path while sidestepping the queue-induced header timeouts.


Assisted-by: Claude:claude-opus-4-7 [Claude Code]

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
2026-05-07 17:28:26 +02:00
..
application feat(gallery): Speed up load times and clean gallery entries (#9211) 2026-05-06 14:51:38 +02:00
backend fix(backend): resolve relative draft_model paths against the models dir (#9680) 2026-05-06 00:58:38 +02:00
cli fix(distributed): make backend upgrade actually re-install on workers (#9708) 2026-05-07 17:28:14 +02:00
clients feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
config feat(gallery): Speed up load times and clean gallery entries (#9211) 2026-05-06 14:51:38 +02:00
dependencies_manager feat(ui): move to React for frontend (#8772) 2026-03-05 21:47:12 +01:00
explorer feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
gallery feat(gallery): Speed up load times and clean gallery entries (#9211) 2026-05-06 14:51:38 +02:00
http feat(api/transcription): include segments + duration + language on stream done event (#9709) 2026-05-07 17:28:26 +02:00
p2p feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
schema feat: support word-level timestamps for faster-whisper (#9621) 2026-05-06 00:32:52 +02:00
services fix(distributed): make backend upgrade actually re-install on workers (#9708) 2026-05-07 17:28:14 +02:00
startup feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
templates fix(vision): propagate mtmd media marker from backend via ModelMetadata (#9412) 2026-04-18 20:30:13 +02:00
trace feat: add LocalVQE backend and audio transformations UI (#9640) 2026-05-04 22:07:11 +02:00