Skip to content

feat(i18n): add Indonesian (id) language support for OmniVoice - #1206

Open
Ahmadnidzam wants to merge 1 commit into
jamiepine:mainfrom
Ahmadnidzam:feat/indonesian-language-omnivoice
Open

Ahmadnidzam wants to merge 1 commit into
jamiepine:mainfrom
Ahmadnidzam:feat/indonesian-language-omnivoice

Conversation

@Ahmadnidzam

Copy link
Copy Markdown

Summary

Adds Indonesian (id) support, end to end, for the OmniVoice TTS engine and Whisper STT.

  • UI: new id locale (882 keys, same structure as en), registered in the i18n setup and the STT language picker.
  • API: id is accepted by the language fields of voice profiles, generation, speak, capture retranscription, and transcription. This is additive.
  • Engines: id is listed for OmniVoice. Other TTS engines reject id with HTTP 400 and a clear message. Other language codes are unchanged.
  • Robustness: OmniVoice can return an empty or silent waveform for some inputs (a zero-size array error in post-processing). Generation now retries with the seed offset by attempt index, so retries stay deterministic. If every attempt fails, it raises a RuntimeError with a clear message.
  • Quality default: NUM_DIFFUSION_STEPS moves from 32 to 64. On a 24-sentence Indonesian benchmark (2 seeds), the median WER on clean sentences went from roughly 0.05-0.07 to 0. Generation takes about twice as long (about 3.8 s vs 1.8 s per clip on an RTX 3050).

Notes for reviewers

  • License: OmniVoice weights are CC-BY-NC, as the engine's existing label already says. Indonesian TTS via this path is therefore non-commercial only.
  • Language code: OmniVoice's own language map uses id for Indonesian. The override table is unchanged; id passes straight through.
  • Behavior change: id requests to engines without Indonesian now return 400. Other languages keep their previous behavior. Only id is guarded, to avoid breaking existing clients.
  • Not included: the generated API client under app/src/lib/api is not regenerated. The frontend does not validate language codes through it, so this PR does not need it. Regenerating would touch many unrelated files.
  • Latency: the 64-step default doubles OmniVoice generation time.

Testing

  • Typecheck (bun run typecheck) passes. bun run build:web passes.
  • Backend suite: 342 passed, 11 skipped, 2 failed. Both failures predate this change and come from the Windows environment: test_find_ffmpeg_honours_override_dir expects an extensionless ffmpeg, and test_hf_progress_tracker captures no tqdm updates.
  • New tests:
    • test_omnivoice_empty_retry.py (6): retry on empty output, seed offset, final error, instruct errors are not retried, and the degenerate-output check.
    • test_generation_language_guard.py (9): id rejected on engines without it, accepted on OmniVoice, other languages untouched.
  • Manual check: 24-sentence Indonesian benchmark with Whisper-medium STT. No TTS failures after the retry fix.

🤖 Generated with Claude Code

- Add an Indonesian UI locale (882 keys) and register it in the i18n setup.
- Accept "id" in language fields for voice profiles, generation, speak,
  capture retranscription, and transcription.
- Expose Indonesian for the OmniVoice engine and the STT language picker.
- Reject "id" with 400 on TTS engines that do not declare Indonesian.
- Retry OmniVoice generation when the output is empty or silent, with a
  seed offset per attempt so retries stay deterministic.
- Raise the default OmniVoice diffusion steps from 32 to 64. On the
  Indonesian benchmark this lowered the median WER on clean sentences.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nu2q6yVHAzP3TaTUA3wXu2

This branch has not been deployed

No deployments
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.

2 participants