feat: replace wanakana with english-to-kana 49K dictionary
- Vendor english-kana-matcher.js (english-to-kana, MIT, 49216 words) - Rewrite bridge: dictionary lookup + letter-by-letter fallback for OOV words - Convert English punctuation (,.!?) to Japanese pauses (、。) - Fix Chinese fullwidth comma being stripped by filter_kana - Preserve decimal points in numbers (3.5 -> スリーファイブ) - main.py now applies filter_kana (matches web UI behavior) - Remove wanakana dependency; rebuild portable zip (82.5 MB)
This commit is contained in:
@@ -12,7 +12,7 @@ import signal
|
||||
import sys
|
||||
|
||||
from danmaku_handler import DanmakuClient
|
||||
from chinese2kana import chinese_to_kana
|
||||
from chinese2kana import chinese_to_kana, filter_kana
|
||||
from tts import TTSBridge
|
||||
from audio_player import play_wav_async, get_output_devices
|
||||
|
||||
@@ -47,6 +47,7 @@ async def tts_worker(queue: asyncio.Queue, bridge: TTSBridge,
|
||||
continue
|
||||
try:
|
||||
kana = chinese_to_kana(text, convert_numbers=convert_numbers)
|
||||
kana = filter_kana(kana)
|
||||
logger.info("Speaking: %s -> %s", text, kana)
|
||||
wav_data = await bridge.synthesize(kana)
|
||||
await play_wav_async(wav_data)
|
||||
|
||||
Reference in New Issue
Block a user