Skip to content

TOEIバスTTSで「このバスは〜ゆきです」が毎回再生される不具合を修正 - #5996

Merged
TinyKitten merged 1 commit into
devfrom
fix/bus-tts-toei-bound-repeat
May 14, 2026
Merged

TinyKitten merged 1 commit into
devfrom
fix/bus-tts-toei-bound-repeat

Conversation

@TinyKitten

@TinyKitten TinyKitten commented May 14, 2026 •

Copy link
Copy Markdown
Member

概要

TOEIテーマのバスTTSで、初回案内のはずの「このバスは、〜ゆきです。」(日本語) と "This bus is bound for ..." (英語) が firstSpeech 条件の外側に置かれており、各停車のたびに繰り返し再生されていた不具合を修正する。

変更の種類

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

変更内容

  • src/hooks/useBusTTSText.ts の APP_THEME.TOEI テンプレート (JA/EN) で、「このバスは、{boundForJa}ゆきです。」/ "This bus is bound for {boundForEn}." を firstSpeech の三項演算子の中に移動。
  • 他テーマ (TOKYO_METRO / TY / YAMANOTE / SAIKYO / JR_WEST / JR_KYUSHU) は元々 firstSpeech 条件下にあり、TOEIだけ条件外だったのを揃えた。
  • src/hooks/useBusTTSText.test.tsx に回帰テストを追加。TOEIテーマで firstSpeech=false のとき、JAに「このバスは」「ご利用くださいまして」、ENに "This bus is bound for"・"Thank you for using the" が含まれないことを検証する。

テスト

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

関連Issue

スクリーンショット(任意)

Summary by CodeRabbit

リリースノート

  • バグ修正

    • TOEI テーマのバス案内通知で、初回放送以外は特定の導入フレーズが読み上げられないよう改善しました。初回放送では従来通り読み上げられます。
  • テスト

    • バス TTS 出力の回帰テストを追加しました。

Review Change Stack

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

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 512c5938-c3b3-4b4e-8459-af794686f189

📥 Commits

Reviewing files that changed from the base of the PR and between 0a9d98e and 1b92386.

📒 Files selected for processing (2)
  • src/hooks/useBusTTSText.test.tsx
  • src/hooks/useBusTTSText.ts

📝 Walkthrough

Walkthrough

TOEI テーマの NEXT アナウンスにおいて、初回放送を示す firstSpeech フラグに基づいて TTS 出力を制御する変更です。firstSpeech=true の場合のみ「このバスは...ゆきです」および「This bus is bound for...」の文言を含めるよう実装を調整し、回帰テストで新しい動作を検証しています。

Changes

TOEI NEXT 条件付き発話

Layer / File(s) Summary
TOEI NEXT 発話の条件付きレンダリング
src/hooks/useBusTTSText.ts
TOEI テーマの日本語 NEXT テンプレート(行 445-450)および英語 NEXT テンプレート(行 690-696)において、「このバスは${boundForJa}ゆきです。」および「This bus is bound for ${boundForEn}.」を firstSpeech 条件付きで含めるようになりました。firstSpeech=false の場合、これらの文言は TTS 出力に含まれません。
TOEI NEXT firstSpeech=false の回帰テスト
src/hooks/useBusTTSText.test.tsx
TOEI テーマの NEXT において firstSpeech=false の場合に、bound-for 句と感謝の文言が TTS 出力に含まれないことを検証する回帰テスト(行 335-353)を追加しました。

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

react

Poem

🐰 バスの乗車案内、最初だけ長く —
二度目以降は短く読み上げ、
first が false なら「このバスは」も消えて、
敏速な流れ、耳も快適に。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed タイトルはTOEIバス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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/bus-tts-toei-bound-repeat

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.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@TinyKitten
TinyKitten merged commit 25fe0c8 into dev May 14, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the fix/bus-tts-toei-bound-repeat branch May 14, 2026 23:43
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.

1 participant