feat(server): expose transcription progress via GET /progress - #408
Merged
Merged
Conversation
Adds a pollable progress endpoint to the HTTP server: while a
transcription runs, do_transcribe updates g_server_progress (0..100)
in its chunk loop; GET /progress returns {"busy": bool, "progress": -1..100}.
Motivation: long-running jobs (ASR transcription, speaker diarization,
and other backends routed through the same server path) are submitted
as a single synchronous POST; the server previously had no progress
channel over HTTP (the whisper progress callback only printed to stderr).
Notes:
- One job per container today, so a single atomic is honest; with
--server-workers concurrency this needs per-request scoping (future work).
- progress_scope guard resets busy/progress on every exit path.
tilllt
force-pushed
the
feat/server-progress
branch
from
August 28, 2026 21:44
60f9206 to
7031685
Compare
Fixes the clang-format (style) lint check in PR CI: alignment of the atomic globals, brace layout of progress_scope, and comment spacing in the chunk loop and GET /progress handler.
CrispStrobe
pushed a commit
that referenced
this pull request
Aug 29, 2026
#408 GET /progress: - progress_scope moved INSIDE the model-mutex block: a request queued behind a running job used to reset the live job's progress to 0, and whichever job finished first flipped the server 'idle' while the other still ran - busy is an active-job counter, so it stays honest under --server-workers - the chunk loop claims a chunk when it STARTS (i, not i+1, which read 100 while the last chunk was still decoding) and pins 100 through the diarize/punc/truecase tail - route auth-gated like /backends (/health stays the public probe) - docs/server.md section + tests/test-server-progress.sh integration test (idle/busy/reset contract + auth), registered as a live test #406 SIMDCONV: - chatterbox gate uses core_cpu_backend::is_cpu() instead of the backend==backend_cpu pointer compare (the parakeet pick_backend lesson: the compare can read GPU under --no-gpu and silently keep the feature off on the machines it exists for) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138mFhGiCzAwiNqdtwtq439
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a pollable progress endpoint to the HTTP server. While a job runs,
do_transcribeupdates a server-side progress value (0..100) in its chunk loop;GET /progressreturns{"busy": bool, "progress": -1..100}(-1= idle).Motivation
Long-running jobs (ASR transcription, speaker diarization, and every other backend that flows through the chunk loop in
do_transcribe) are submitted as a single synchronous POST. The server previously had no progress channel over HTTP — the whisper progress callback only printed to stderr, so clients could only show a heartbeat. With/progress, any client can poll honest 0..100 progress for the active job.What it covers
{"busy": false, "progress": -1}when no job is running.Design notes
--server-workersconcurrency this needs per-request scoping — flagged as future work in the code comment.progress_scopeguard resetsbusy/progresson every exit path (including error returns).Verification
/healthok,/progressidle{"busy": false, "progress": -1}, and during a transcription{"busy": true, "progress": 0..100}.Drafted with assistance from an AI agent (Hermes) on behalf of the contributor.