Repository navigation
外部APIによるTTS音声生成を廃止しOSネイティブTTS(expo-speech)での読み上げに置き換え - #6453
Conversation
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HHRhvZfdgzmX8Dakjw7Dqt
|
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 ignored due to path filters (1)
📒 Files selected for processing (24)
💤 Files with no reviewable changes (14)
📝 WalkthroughWalkthroughサーバー音声取得と音声プレイヤー方式を廃止し、 ChangesTTS移行と関連契約整理
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CurrentLine
participant useTTSText
participant useTTS
participant ExpoSpeech
CurrentLine->>useTTSText: 現在の案内文を生成
useTTSText->>useTTS: JA/ENテキストを返却
useTTS->>ExpoSpeech: Speech.speakでキュー投入
ExpoSpeech-->>useTTS: 完了・停止・エラー通知
useTTS->>useTTS: 発話完了数を集計し状態解放
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)package.jsonTraceback (most recent call last): 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 |
概要
外部API(Cloudflare Worker
/tts→ Azure Speech)による TTS 音声生成を廃止し、OS ネイティブの音声合成(expo-speech)での読み上げに置き換えました。変更の種類
変更内容
useTTSを全面書き換え。セッショントークン取得 →/ttsフェッチ → 音声ファイル書き込み →expo-audio再生の流れを廃止し、Speech.speak()に JA(ja-JP)→ EN(en-US)の順でキューを積む方式に変更(pending 管理・初回発話抑止・resetFirstSpeechAtomの同期リセットなど既存の発話制御は維持)onDone/onError/onStopped)が届かず再生パイプラインが詰まるケースに備えた安全タイムアウト(5 分)のウォッチドッグを維持。発火時はSpeech.stop()で解放setAudioModeAsyncは継続(iOS のAVSpeechSynthesizerはアプリの音声セッションを共有するため、サイレントスイッチ中の読み上げ・バックグラウンド再生・ダッキングの挙動維持に必要)<phoneme>/<break>/<say-as>)をネイティブ TTS 用に変換するssmlToPlainTextユーティリティを新設(単体テスト付き)ttsSpeechFetcher/ttsAudioPlayer/useTTSCache/base64ToUint8Array/test/ttsMocks(各テスト含む)とconstants/tts.tsttsJaVoiceName/ttsEnVoiceName、ストレージキー、TuningSettingsの読み込み処理)を撤去useTTSTextのnextText(NEXT テンプレの先行生成)を削除expo-speech(~55.0.16) を依存に追加、README のバックエンド説明から TTS の言及を更新テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ることnpm run lint/npm run typecheck/npm test(191 スイート / 2035 件)すべてパス。留意点:
pod install、両 OS とも Dev Client の再ビルドが必要関連Issue
スクリーンショット(任意)
Summary by CodeRabbit
新機能
改善
ドキュメント