Skip to content

TTS読み上げ音量を機種既定値に依存せず常に最大へ明示指定 - #6467

Merged
TinyKitten merged 1 commit into
devfrom
claude/tts-volume-too-low-6zq2hz
Jul 24, 2026
Merged

TinyKitten merged 1 commit into
devfrom
claude/tts-volume-too-low-6zq2hz

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jul 24, 2026 •

Copy link
Copy Markdown
Member

概要

TTSアナウンスの音量が低すぎるというユーザー報告への対応です。expo-speech の Speech.speak() に volume オプションが未指定のままだったため、端末・OSバージョンのデフォルト音量に発話音量が左右されていました。常に最大音量 (1.0) を明示指定するようにしました。

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

  • 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

  • 改善
    • 音声読み上げの音量を最大レベルに固定し、端末やOSによる既定音量の差を抑えました。

@github-actions github-actions Bot added the react label Jul 24, 2026
@TinyKitten TinyKitten self-assigned this Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

useTTS に最大音量定数を追加し、Speech.speak の各発話リクエストへ volume: 1.0 を設定します。既存の発話制御は変更されていません。

Changes

TTS音量制御

Layer / File(s) Summary
発話音量設定
src/hooks/useTTS.ts
最大音量定数を追加し、Speech.speak の発話オプションへ適用します。

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Poem

ぴょんと跳ねて、声ひびく
音量いっぱい、月まで届く
TTSのうさぎもごきげんだ
小さな声を置いていこう
最大音量で、ぴょん!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PRタイトルはTTS読み上げ音量を常に最大に明示指定する変更点を的確に要約しています。
Description check ✅ Passed 概要・変更の種類・変更内容・テストが揃っており、テンプレート要件を概ね満たしています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/tts-volume-too-low-6zq2hz

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 @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between ffbd8db and baeacd5.

📒 Files selected for processing (1)
  • src/hooks/useTTS.ts

@TinyKitten
TinyKitten merged commit adcd866 into dev Jul 24, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the claude/tts-volume-too-low-6zq2hz branch July 24, 2026 09:25
@TinyKitten TinyKitten mentioned this pull request Jul 24, 2026
4 of 9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants