Skip to content

Fix Japanese Qwen truncation and missing syllables - #49

Merged
ivan-digital merged 4 commits into
mainfrom
fix/japanese-qwen-synthesis
Oct 25, 2026
Merged

ivan-digital merged 4 commits into
mainfrom
fix/japanese-qwen-synthesis

Conversation

@ivan-digital

@ivan-digital ivan-digital commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Addresses #48. Japanese lines without spaces were given a 40-frame Qwen budget, cutting speech off around 3.2 seconds. Count CJK graphemes when budgeting and chunking speech, retain the selected language across engine fallbacks, and build against the corrected Qwen codec decoder so complete syllables survive reference separation and chunk boundaries.

Changes

  • Recognize CJK sentence/clause punctuation and split long runs at grapheme boundaries; retain existing bounds for spaced scripts.
  • Restore the user's language when returning from an engine that needs a fallback, and normalize Qwen language names before IPC.
  • Pin the macOS runtime to the tested commit from Preserve complete Qwen3-TTS audio across decode chunks speech-swift#538. That fix removes an unintended 120 ms loss from every decoded audio chunk.
  • Add opt-in raw/trimmed/final WAV capture from the same Qwen generation, without changing cleanup or default output.
  • Add budget, chunking, language-state, IPC, and audio-cleanup regressions, plus a model-backed Japanese test covering two full-text seeds and the individual sentence chunks.
  • Run the audio-cleanup checks in macOS CI with release testability and the Metal library staged beside the test executable.
  • Restrict frontend test discovery to src/ so SwiftPM dependency tests cannot contaminate the suite.
  • Synchronize the README translations and prepare patch version 0.0.11.

Test plan

  • 86 frontend tests and production TypeScript/Vite build.
  • Cache-discovery check: a throwing test under SwiftPM's .build was excluded while all 86 frontend tests passed.
  • 45 Rust unit tests and 6 sidecar protocol tests.
  • 3 audio-cleanup/debug-capture tests in both debug and optimized release builds.
  • Japanese sidecar regression: first word, middle syllables, and sentence endings preserved in raw and final audio, across two full-text seeds and both sentence chunks (8 ASR comparisons).
  • Runtime: 24 focused unit tests, chunk/overlap boundary checks, Japanese cloning at two fixed seeds, and the existing English cloning round-trip.
  • Runtime CI: 1,836 tests, 46 skipped, zero failures; its post-merge CI also passed.
  • macOS, Windows, and Linux installer builds and all security-analysis checks passed on the reviewed head.
  • The runtime PR merged first; the pinned commit is reachable on its main branch.

The model tests generate a matched macOS system-voice reference. No original speaker recording, project, or private logs are included. The separate CosyVoice symptom has no captured synthesis log and remains unconfirmed; this change does not claim to resolve it.

@ivan-digital
ivan-digital merged commit 202b9aa into main Oct 25, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant