Repository navigation
ネイティブTTSの漢字誤読対策と英語文への日本語混入時に日本語音声で合成される問題の修正 - #6463
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HHRhvZfdgzmX8Dakjw7Dqt
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughSSMLの ChangesTTS処理と案内文
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HHRhvZfdgzmX8Dakjw7Dqt
4 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
OS ネイティブ TTS の読み上げにおける言語・読みの不整合への対策です。iOS で「に停まります」が「にていります」と読まれる報告を受けたひらがな化と
<sub>タグのカタカナ読み採用に加えて、英語文に日本語が混入した際に日本語音声で全文が合成される問題の最終防衛線(発話前の日本語除去)を追加しました。変更の種類
変更内容
ssmlToPlainTextで<sub alias="読み">表記</sub>を alias(カタカナ読み)へ置き換えるよう修正。これまでタグ除去で中身の漢字が残り、駅名・路線名に対してデータが持つ正しい読み(nameKatakana由来)が捨てられてエンジン任せの漢字読みになっていたstripJapaneseCharacters)。nameRomanが欠落した駅データではwrapPhonemeのローマ字フォールバックが効かず英語文に日本語が残ることがあり、日本語が混じった英語文は voice を明示指定していても TTS エンジンが言語を誤判定して全文を日本語音声で合成してしまうため、固有名詞が欠けても正しい英語音声で読む方を優先するssmlToPlainTextの sub タグ処理、stripJapaneseCharacters、useTTSの日本語混入時の除去・警告テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ることnpm run lint/npm run typecheck/npm test(193 スイート / 2077 件)すべてパス。補足: 英語文への日本語混入が検知された場合は
[useTTS] English text contains Japanese characters, stripping:の警告と対象テキストが Metro コンソールに出力されます。該当駅のデータ(nameRoman/nameTtsSegments)修正の手がかりになります。関連Issue
スクリーンショット(任意)
Summary by CodeRabbit