[BUG] Qwen3-ASR: long dictation is lost entirely when transcribe.cpp throws outputTruncated (partial transcript discarded, nothing in History)

Open
#1,304 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
swift
Domain
backend

Research direction

Start in Sources/Fluid/Services/WhisperProvider.swift at the session.run(...) call around line 327 and trace how transcription errors reach insertion and History. Inspect how TranscribeError.outputTruncated exposes its partial transcript, then compare the related Cohere handling in issue #736. Done means a long Qwen3-ASR dictation preserves the partial transcript in the result and History instead of reporting zero characters.

Written by the indexing model from the issue text.

Description

Describe the bug

A long dictation with Qwen3-ASR 1.7B (Whisper (Universal) / transcribe.cpp provider) is lost completely. transcribe.cpp hits its decode cap and throws outputTruncated, which carries a usable partial transcript, but FluidVoice treats it as a plain failure: nothing is inserted, nothing is written to History, and the partial text exists only inside the error line in ~/Library/Logs/Fluid/Fluid.log. The recording is not kept, so the rest cannot be re-transcribed.

In my case the recording was 2:45 min (German). The partial in the log held roughly the first ~1,000 characters. My longest successful Qwen3 dictation so far was ~89 s / ~1,600 chars, so the cap is hit somewhere between 1.5 and 3 minutes of speech.

Related but different: #736 (Cohere truncates, but at least inserts the truncated text). Here the whole dictation is gone.

Reproduction steps
  1. Settings → Voice Engine → select Qwen3-ASR 1.7B (Whisper (Universal) provider), language German.
  2. Start a normal dictation (toggle hotkey) into any text field.
  3. Speak continuously for ~3 minutes, then stop.
  4. Observe: nothing is pasted, History has no new entry, "Copy latest transcription" copies the previous (older) entry.
Expected behavior
  • At minimum: when session.run throws outputTruncated with a partial transcript, use the partial (insert it and save it to History, ideally with a "truncated" marker / notification) instead of discarding it.
  • Better: chunk long audio for Qwen3-ASR (as is done for Cohere), so the cap is never hit.
  • Optionally: keep the last recording's audio until the transcript is delivered, so a failed run can be retried.
Actual behavior

The dictation ends with outcome=asr_failed, chars=0, nothing is inserted or stored. Only the log contains the partial text.

Code path (at b00eeb18c3): WhisperProvider.transcribe(_:languageCode:) calls try await session.run(...) in Sources/Fluid/Services/WhisperProvider.swift:327 and has no handling for TranscribeError.outputTruncated, so the error and its partial propagate up and the transcript is dropped.

App Version

1.6.13-beta.2

macOS Version

macOS 27.0.1

Architecture

Apple Silicon

Logs or crash report
[11:40:29.594] [INFO] [ASRService] ✅ START() completed successfully
[11:43:14.459] [INFO] [ASRService] pipelineID=40A49393-… 🛑 STOP() called - beginning shutdown sequence
[11:43:18.160] [ERROR] [ASRService] pipelineID=40A49393-… ASR transcription failed: outputTruncated(message: "run: output truncated: decode hit the context/generation cap before end-of-stream", partial: Optional(TranscribeCpp.Transcript(text: "<~1,000 chars of German partial transcript, omitted>", language: Optional("de"), timestampKind: TranscribeCpp.TimestampKind.none, segments: [TranscribeCpp.Segment(t0Ms: 0, t1Ms: 164864, …)], words: [], tokens: [], timings: TranscribeCpp.Timings(loadMs: 651.426, melMs: 52.402, encodeMs: 595.556, decodeMs: 2839.54))))
[11:43:18.161] [ERROR] [ASRService] pipelineID=40A49393-… Error domain: TranscribeCpp.TranscribeError, code: 10
[11:43:18.164] [INFO] [ContentView] pipelineID=40A49393-… Stop transcription result | chars=0 | empty=true
[11:43:18.164] [INFO] [AppBenchmark] pipelineID=40A49393-… DICTATION_SUMMARY asrMs=-1 aiMs=-1 appOverheadMs=3706 readyMs=3706 slowest=app_overhead outcome=asr_failed
[11:43:22.092] [INFO] [MenuBarManager] Menu action: Copied latest transcription to clipboard   <- copies the previous, unrelated entry

Model setting: SelectedSpeechModel = "qwen3-asr-1.7b".

Dominant language
Swift
Stars
11.9k
Forks
863
Avg merge
1d 20h
Merged PRs (30d)
36

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from altic-dev/FluidVoice

All issues in altic-dev/FluidVoice

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.