Repository navigation
TTS読み上げ音量を機種既定値に依存せず常に最大へ明示指定 - #6467
Conversation
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E8BgzF4RLN4ktyqHVafTJC
📝 WalkthroughWalkthrough
ChangesTTS音量制御
Estimated code review effort: 1 (Trivial) | ~3 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/hooks/useTTS.ts (1)
384-384: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win音量指定をテストで検証してください。
src/hooks/useTTS.test.tsの既存アサーションはlanguageのみを確認しており、volume: 1.0が欠落してもテストが成功します。SpeechOptionsにvolume?: numberを追加し、volume: 1.0を明示的に検証してください。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/hooks/useTTS.ts` at line 384, Update the existing useTTS tests to assert that SpeechOptions includes volume set to 1.0 alongside the language assertion, and extend the SpeechOptions type with an optional numeric volume property so this expectation is represented in the type definition.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/hooks/useTTS.ts`:
- Line 384: Update the existing useTTS tests to assert that SpeechOptions
includes volume set to 1.0 alongside the language assertion, and extend the
SpeechOptions type with an optional numeric volume property so this expectation
is represented in the type definition.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 06896010-bb07-4641-a51f-8e709f4e7073
📒 Files selected for processing (1)
src/hooks/useTTS.ts
概要
TTSアナウンスの音量が低すぎるというユーザー報告への対応です。
expo-speechのSpeech.speak()にvolumeオプションが未指定のままだったため、端末・OSバージョンのデフォルト音量に発話音量が左右されていました。常に最大音量 (1.0) を明示指定するようにしました。変更の種類
変更内容
src/hooks/useTTS.ts:MAX_SPEECH_VOLUME = 1.0定数を追加Speech.speak()呼び出しにもvolume: MAX_SPEECH_VOLUMEを明示指定し、機種依存の既定音量より下がらないようにしたテスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ることsrc/hooks/useTTS.test.tsの既存テスト21件はexpect.objectContainingで検証しているため、volumeフィールド追加後も全てpassすることを確認済みです。関連Issue
スクリーンショット(任意)
Generated by Claude Code
Summary by CodeRabbit