Skip to content

feat: add Cantonese (粵語) language support via Whisper zh-yue - #10

Open
andeeY0Y wants to merge 1 commit into
aievolutionpl:masterfrom
andeeY0Y:feature/cantonese-support
Open

andeeY0Y wants to merge 1 commit into
aievolutionpl:masterfrom
andeeY0Y:feature/cantonese-support

Conversation

@andeeY0Y

Copy link
Copy Markdown

Summary

Adds Cantonese (粵語) as a selectable language in VoxFlow, using Whisper's built-in zh-yue language code for native Cantonese speech recognition.

Changes

File Change
voxflow/config.py Add zh-yue to _VALID_LANGUAGES and available_languages dict
voxflow/app.py Add zh-yue to language dropdown; add 🇭🇰 flag to all _LANG_FLAGS maps
voxflow/transcriber.py Add 🇭🇰 flag for zh-yue
voxflow/post_processor.py Add CANTONESE_INITIAL_PROMPT (biases Whisper toward traditional Chinese chars); add Cantonese filler removal

How it works

  • User selects 🇭🇰 粵語 (Cantonese) from the language dropdown
  • transcriber.py passes language="zh-yue" directly to faster-whisper
  • Whisper large-v3 or medium model is recommended for best Cantonese results (traditional Chinese characters, 粵語 vocabulary)

No structural changes

The implementation is purely additive — all existing languages and functionality are preserved. The faster-whisper library already natively supports zh-yue, so no model changes are required.

- Add 'zh-yue' to _VALID_LANGUAGES and available_languages dict
- Add Cantonese option to UI language dropdown (displays as '🇭🇰 粵語 (Cantonese)')
- Pass language='zh-yue' to faster-whisper for Cantonese transcription
- Add Cantonese initial_prompt for better traditional Chinese character output
- Add Cantonese filler word removal (嗯, 啊, 呀, etc.)
- Add zh-yue to all _LANG_FLAGS maps with 🇭🇰 flag
- Whisper large-v3 or medium model recommended for best Cantonese results
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