Remove progress throttle so every segment emits a progress update
Previously, progress messages were only sent every 5th segment due to a `segment_count % 5` guard. This made the UI feel unresponsive for short recordings with few segments. Now every segment emits a progress update with a more descriptive message including the segment number and audio percentage. Adds a test verifying that all 8 mock segments produce progress messages, not just every 5th. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -145,16 +145,14 @@ class TranscribeService:
|
||||
)
|
||||
)
|
||||
|
||||
# Send progress every few segments
|
||||
if segment_count % 5 == 0:
|
||||
write_message(
|
||||
progress_message(
|
||||
request_id,
|
||||
progress_pct,
|
||||
"transcribing",
|
||||
f"Processed {segment_count} segments...",
|
||||
)
|
||||
write_message(
|
||||
progress_message(
|
||||
request_id,
|
||||
progress_pct,
|
||||
"transcribing",
|
||||
f"Transcribing segment {segment_count} ({progress_pct}% of audio)...",
|
||||
)
|
||||
)
|
||||
|
||||
elapsed = time.time() - start_time
|
||||
print(
|
||||
|
||||
Reference in New Issue
Block a user