Repository navigation
TTSのsub aliasをひらがな変換せずカタカナのまま渡して都営などのアクセント句分割を防ぐ - #6279
Merged
Merged
Conversation
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 (3)
📝 WalkthroughWalkthrough
ChangesSSML alias カタカナ直接渡し
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
概要
駅名・路線名・会社名の TTS 読み上げで、
<sub alias>に渡す読みをカタカナからひらがなへ変換していたために、Azure Speech の日本語フロントエンドが alias 文字列を再解析した際に先頭モーラを助詞と誤認し、アクセント句が分割される読み崩れが起きていた(例: 「都営(トエイ)」が「と・えい」と切れて読まれる)。alias をカタカナのまま渡すよう変更してこれを防ぐ。変更の種類
変更内容
src/hooks/tts/formatters.ts:replaceJapaneseTextでnameKatakanaをひらがな変換(katakanaToHiragana)せずカタカナのまま<sub alias>に渡すよう変更。意図をコメントで明記。useHeaderStationText.ts)は対象外で変更なし。formatters.test.tsをカタカナ alias 仕様に合わせ、「都営 → トエイ」の回帰テストを追加。useTTSText.test.tsxの alias 期待値(属性内のひらがなのみ)をカタカナへ更新。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること備考: Azure Speech をこの環境から直接叩けないため、実機での読み上げ聴き比べは未実施。主要な駅名・社名(都営/東京メトロ/各社直通名など)の実機確認を推奨。
関連Issue
スクリーンショット(任意)
Generated by Claude Code
Summary by CodeRabbit
リリースノート