Skip to content

Improve frequent Chinese/English switching where Whisper can drop segments #4

Closed

Description

@FlyingFSR

Problem

Friday can still lose words or entire short sentences when the speaker switches between Chinese and English many times in one dictation.

This is a real quality issue for the target workflow: users often dictate technical notes that mix Chinese, English product names, code terms, model names, and project names.

Current understanding

Whisper language detection and decoding can behave poorly when one recording contains many rapid language changes. The app already includes prompt biasing and post-processing for common mixed-language technical vocabulary, but that does not fully solve dropped segments.

Expected outcome

Frequent Chinese/English switching should preserve all spoken content as much as possible, even if punctuation or casing still needs cleanup.

Possible directions

  • Revisit VAD or silence-based segmentation so each chunk has fewer language switches.
  • Compare single-pass auto decoding with segmented per-chunk decoding.
  • Add real-world mixed-language smoke fixtures or manual test scripts.
  • Track failure cases separately from cleanup issues: dropped content is more serious than punctuation or capitalization.
  • Consider a fallback route for long or highly mixed recordings.

Verification

Create a repeatable test phrase with frequent Chinese/English switching, run it across Medium and Large v3, and compare whether any phrases are dropped.

Activity

  1. added
    bug
    enhancement
    on Jun 2, 2026
  2. pinned this issue on Jun 6, 2026
  3. FlyingFSR commented on Jul 11, 2026

    @FlyingFSR
    OwnerAuthor

    Status update after several weeks of daily use and experiments:

    Since 0.3.4 Friday ships the Medium model only (Turbo was retired precisely because it dropped mid-sentence segments). With Medium, daily mixed Chinese/English dictation has been noticeably more stable — no recurrence of the dropped-segment pattern in normal use.
    Segmented per-chunk decoding was evaluated and rejected: cutting one recording into chunks creates new boundary errors that are worse than the problem it tries to solve.
    Prompt biasing for common technical vocabulary and VAD support remain in place.
    Keeping this open as a known limitation: rapid in-sentence language switching can still occasionally lose words — that's an upstream Whisper decoding behavior. Honest expectation: incremental improvement, no silver bullet. Next concrete step would be a repeatable mixed-language test fixture so regressions are measurable.

  4. botaruibo commented on Jul 16, 2026

    @botaruibo

    This is a very familiar failure mode for Chinese + English/code-term dictation. I maintain MyVoiceTyping, a local-first macOS Chinese / mixed Chinese-English voice typing project, and I have been treating this as a separate class from punctuation/polish errors too: dropping content is much worse than formatting it badly.

    A useful regression fixture might include short bursts like:

    帮我 refactor 这个 React hook,把 useEffect 里面的 fetchUserProfile 抽成 async function,然后加一个 loading state。
    

    And a longer one with repeated switches:

    今天先 review login flow,重点看 send verification code 之后 button countdown,接口 500 的时候要 recover state,不要 stuck 在 disabled。
    

    For scoring, I would separate at least four buckets:

    • dropped Chinese phrase;
    • dropped English/code identifier;
    • identifier normalized into the wrong word;
    • punctuation / casing / spacing only.

    Only the last bucket should be allowed to pass as a cleanup issue. The first three should block a candidate even if WER looks acceptable.

    One implementation detail that has helped my thinking: keep the STT output as a reviewable buffer and let the cleanup/polish layer operate after that, instead of hiding dropped-content cases behind a polished final text. Also avoid logging raw transcripts or final prompts by default, because mixed Chinese-English dictation is often work content or coding prompts.

    For reference, I have been collecting the app/model/dataset side publicly here:

  5. FlyingFSR commented on Aug 29, 2026

    @FlyingFSR
    OwnerAuthor

    Fixed in v0.4.0. A controlled evaluation traced the dropped segments to the --no-timestamps launch flag (with -mc 0 separately disabling the biasing prompt); with both removed, Chinese sentences inside English-primary speech are no longer dropped and whole-passage mistranslation is gone, across the 21-sample evaluation set. Method and per-sample numbers: docs/language-detection-findings-2026-08.md (Chinese, with an English abstract).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions