Repository navigation
Add natural local voice and contextual journey replies - #3
Merged
Merged
Conversation
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.
Spoken journey replies repeated the departure time and read ISO dates/ranges as written. This adds shorter contextual replies (pickup, drop-off, wait/get-ready, late/passed times and low confidence) and an optional natural British Kokoro voice. Every time, window and confidence still comes from the existing deterministic engine; neither prediction nor the text form changes.
Design decisions:
Validation: lint, strict TypeScript, production build and npm audit (zero vulnerabilities) pass. The expanded suite has 398 tests covering contextual numbers/dates, midnight windows, warnings, cache/runtime restoration, intentional cancellation, stale audio, device fallback and voice discovery, plus the existing full utterance-to-engine path. An evening run exposed two existing timetable fixtures whose arrivals moved past midnight; they now use a fixed midday test clock, with no production change. Chrome production preview verified model download/warm-up, actual WebGPU natural playback, cached reload, Stop, 390px layout and 48px touch targets with no horizontal overflow.
Limits: CPU speech can miss the deadline and fall back; older phones may have memory/battery constraints and gaps between sentences. Physical iOS/Android autoplay/lockscreen, noisy-car recognition and subjective listening tests remain pending. Free-data/callsign limits remain unchanged. Further speech quality/latency work needs device testing and an efficient on-device model; missing flight/queue/traffic facts need reliable licensed data. Rollback is a PR revert, with no journey-schema migration.