Skip to content

feat: support word-level timestamps for faster-whisper - #9621

Merged
mudler merged 2 commits into
mudler:masterfrom
eglia:stt-wordlevel
May 5, 2026
Merged

feat: support word-level timestamps for faster-whisper#9621
mudler merged 2 commits into
mudler:masterfrom
eglia:stt-wordlevel

Conversation

@eglia

@eglia eglia commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Description
This PR extends the transcribe endpoints to also include word timestamps. Currently this is only implemented for the faster-whipser backend, but could also be added for other backends if supported by them. I tried to add whisper.cpp, but apparently there is some outstanding issue.
The individual words are returned twice, once as part of each segment, and once as a top level element. The top level element is to comply with the OpenAI spec, the words per segment to not lose any information which might be useful.

Additionally, the endpoint is adapted to return timestamps in seconds to comply with the OpenAI spec.

This PR fixes #9306

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Andreas Egli <github@kharan.ch>
Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
@mudler
mudler merged commit af83518 into mudler:master May 5, 2026
19 checks passed
@eglia
eglia deleted the stt-wordlevel branch May 6, 2026 04:49
@localai-bot localai-bot added the enhancement New feature or request label May 9, 2026
fqscfqj added a commit to fqscfqj/LocalAI that referenced this pull request Jun 19, 2026
The gRPC server wrapper in pkg/grpc/server.go reconstructs
TranscriptSegment messages when relaying AudioTranscription results
from backends. The Words field was not being copied, causing all
word-level timestamps to be silently dropped regardless of backend
support.

This was introduced when PR mudler#9621 added the TranscriptWord proto
message and transcriptResultFromProto (server-side), but did not
update the server-side gRPC relay to forward the new field.

Fixes mudler#9306

Signed-off-by: fqscfqj <fqscfqj@outlook.com>
mudler pushed a commit that referenced this pull request Jun 19, 2026
#10402)

The gRPC server wrapper in pkg/grpc/server.go reconstructs
TranscriptSegment messages when relaying AudioTranscription results
from backends. The Words field was not being copied, causing all
word-level timestamps to be silently dropped regardless of backend
support.

This was introduced when PR #9621 added the TranscriptWord proto
message and transcriptResultFromProto (server-side), but did not
update the server-side gRPC relay to forward the new field.

Fixes #9306

Signed-off-by: fqscfqj <fqscfqj@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[whisper] word timings in verbose_json

3 participants