Förbättrat ljudsystemet
This commit is contained in:
@@ -1253,8 +1253,14 @@ If one of these breaks, inspect this controller first.
|
||||
#### Audio/event feed
|
||||
- `pushOverlayEventHelper(...)`
|
||||
- `announcePassingHelper(...)`
|
||||
- `announceRaceStartedHelper(...)`
|
||||
- `announceRaceFinishedHelper(...)`
|
||||
- `speakTextHelper(...)`
|
||||
- `getSpeechVoicesHelper(...)`
|
||||
- `selectSpeechVoice(...)`
|
||||
- `getSessionAnnouncementText(...)`
|
||||
|
||||
Start and finish lifecycle announcements are initiated from `timing_views.js`, while timer-based finish uses `handleSessionTimerTickHelper(...)`. Passing announcements use `competitor.speechName` when available. Speech does not interrupt another driver name; a busy speech queue falls back to the passing beep. Start and finish announcements deliberately interrupt pending passing speech.
|
||||
|
||||
### 14.6 `server.js`
|
||||
|
||||
@@ -1322,7 +1328,8 @@ Produced/normalized by:
|
||||
name: string,
|
||||
classId: string,
|
||||
transponder: string,
|
||||
brand: string
|
||||
brand: string,
|
||||
speechName: string // optional phonetic form used only by browser speech
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1600,6 +1607,9 @@ Practical shape contains at least:
|
||||
- backendUrl
|
||||
- decoderUrl / websocket URL
|
||||
- speaker/audio flags
|
||||
- `audioEnabled`, `passingSoundMode`, `startSoundEnabled`, `finishSoundEnabled`
|
||||
- `finishVoiceEnabled` (legacy property name; controls start/finish voice announcements)
|
||||
- `speechVoiceUri`, `speechRate`, `speechPitch`
|
||||
- OBS overlay settings
|
||||
- branding defaults
|
||||
- race preset library
|
||||
@@ -2104,6 +2114,12 @@ npm test
|
||||
- dirty-state protection when newer local edits occur during a request
|
||||
- failed-sync behavior without false version advancement
|
||||
|
||||
`tests/audio_runtime.test.js` covers:
|
||||
- explicit and language-based speech voice selection
|
||||
- practice-specific versus race-specific start/finish phrases
|
||||
- per-driver phonetic spoken-name selection and busy-speech beep fallback
|
||||
- race-start overlay and audio cue dispatch
|
||||
|
||||
`tests/server_persistence.integration.test.js` starts an isolated backend with a temporary SQLite data directory and covers:
|
||||
- health/database path reporting
|
||||
- empty-state response and full app-state round-trip
|
||||
|
||||
Reference in New Issue
Block a user