From 4aafa6c205c3cbcdde16ed5801c64ccdaaab5f04 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Sun, 1 Nov 2026 00:03:58 +0100 Subject: [PATCH] Remove synthesized voice announcements --- README.md | 2 +- docs/components.md | 2 +- docs/realtime-host.md | 2 +- preview/app.js | 22 +++------------------- preview/locales/en.json | 7 +++---- preview/locales/fr.json | 7 +++---- 6 files changed, 12 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 59ca300..f391be6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ For a full mission, expand **Local session / Session locale**. Select 1–5 huma Training starts with its clock paused. **Start practice clock** and **Pause clock** control time only in training; normal missions retain their shared, continuous clock. You can also advance lesson phases explicitly. -The local seat selector, “Ready all” and “Next announcement” buttons are development tools. This host has **no authentication** and deliberately listens only on `127.0.0.1`. It is not an online multiplayer deployment. Use external voice for cooperation; browser speech synthesis is optional and communications-blackout silence relies on the players. +The local seat selector, “Ready all” and “Next announcement” buttons are development tools. This host has **no authentication** and deliberately listens only on `127.0.0.1`. It is not an online multiplayer deployment. Use external voice for cooperation; mission announcements are visual, with sound effects for game actions. Communications-blackout silence relies on the players. ## Implemented diff --git a/docs/components.md b/docs/components.md index 2980eca..178c4da 100644 --- a/docs/components.md +++ b/docs/components.md @@ -58,4 +58,4 @@ The engine checks minimum levels before the run, successful completion, applicab ## Remaining validation and integration -The exact action decks and all standard threat faces are now available; no missing component is filled with a guessed deck distribution. Remaining work before an online release includes broader human playtesting of expansion combinations, mobile multi-client testing on physical devices and a decision about account-wide careers beyond the implemented table-local records. Random mission generation and licensed official art/audio are separate optional work; fixed missions and generated browser speech already run locally. +The exact action decks and all standard threat faces are now available; no missing component is filled with a guessed deck distribution. Remaining work before an online release includes broader human playtesting of expansion combinations, mobile multi-client testing on physical devices and a decision about account-wide careers beyond the implemented table-local records. Random mission generation and licensed official art/audio are separate optional work; fixed missions run locally with visual announcements and sound effects. diff --git a/docs/realtime-host.md b/docs/realtime-host.md index 0ef4368..3e72132 100644 --- a/docs/realtime-host.md +++ b/docs/realtime-host.md @@ -28,7 +28,7 @@ Careers are **table-local**, not account-wide profiles. Moving to another table Configure `timeControl: "engine"` and `rating: "none"`. Players receive the shared mission/campaign score, without competitive Elo settlement. BGS individual clock rings and turn emails are disabled. Game-managed clocks do not yet support BGS analysis mode. The viewer retains its own resolution replay. -Use external voice for cooperation. Speech synthesis is optional; no official recordings or publisher artwork are bundled. Players must honor communications blackouts in their external voice channel. Physical-device audio/background behavior and expansion combinations still need human playtesting before public release. +Use external voice for cooperation. Mission announcements are visual; no synthesized voice, official recordings or publisher artwork are bundled. Players must honor communications blackouts in their external voice channel. Physical-device audio/background behavior and expansion combinations still need human playtesting before public release. ## Verification diff --git a/preview/app.js b/preview/app.js index 443464e..5f4f8bd 100644 --- a/preview/app.js +++ b/preview/app.js @@ -57,7 +57,6 @@ export function mountConsole(root, host = null) { replayFrame = null, sound = true, combine = false, - lastSpoken = 0, basicsStarted = false, basicsPicked = false, basicsMarkup; @@ -175,8 +174,8 @@ export function mountConsole(root, host = null) { function updateSound() { const button = $("#sound"); const description = sound - ? t("app.mute_voice_announcements") - : t("app.enable_voice_announcements"); + ? t("app.mute_sounds") + : t("app.enable_sounds"); button.title = description; button.setAttribute("aria-label", description); button.setAttribute("aria-pressed", String(sound)); @@ -493,11 +492,6 @@ export function mountConsole(root, host = null) { : announcements.length ? announcement(announcements.at(-1).event) : t("app.everyone_confirms_their_presence_before_launch"); - if (sound) - for (const item of announcements.filter((x) => x.id > lastSpoken)) { - if (item === announcements.at(-1)) speak(announcement(item.event)); - } - lastSpoken = announcements.at(-1)?.id ?? 0; $("#program-crew").innerHTML = Array.from( { length: view.crewSize }, (_, i) => @@ -992,14 +986,6 @@ export function mountConsole(root, host = null) { $("#explorer-name").value = ""; }); }); - function speak(text) { - if (!("speechSynthesis" in window)) return; - const u = new SpeechSynthesisUtterance(text); - u.lang = locale === "fr" ? "fr-FR" : "en-US"; - u.rate = 1.1; - speechSynthesis.cancel(); - speechSynthesis.speak(u); - } async function command(type, extra = {}, target = seat) { if (host) { if (target !== seat || seat < 0) @@ -1484,8 +1470,7 @@ export function mountConsole(root, host = null) { sound = !sound; updateSound(); audio?.enable(sound); - if (sound) speak(t("app.announcements_enabled")); - else if ("speechSynthesis" in window) speechSynthesis.cancel(); + if (sound) cue("select"); } if (el.id === "ready-all") perform(async () => { @@ -1698,7 +1683,6 @@ export function mountConsole(root, host = null) { for (const id of intervals) clearInterval(id); for (const [type, fn] of rootListeners) root.removeEventListener(type, fn); - if (sound && "speechSynthesis" in window) speechSynthesis.cancel(); }, }; } diff --git a/preview/locales/en.json b/preview/locales/en.json index 983bb12..e5cd3a3 100644 --- a/preview/locales/en.json +++ b/preview/locales/en.json @@ -45,8 +45,8 @@ "app.basic": "basic", "app.heroic_move": "Heroic move · ", "app.heroic": "Heroic · ", - "app.mute_voice_announcements": "Mute sounds", - "app.enable_voice_announcements": "Enable sounds", + "app.mute_sounds": "Mute sounds", + "app.enable_sounds": "Enable sounds", "app.serious_threat": "Serious threat", "app.threat": "Threat", "app.internal": "internal", @@ -224,7 +224,6 @@ "app.card_unavailable": "Card unavailable", "app.check_the_achievement_requirements_before_recording_it": "Check the achievement requirements before recording it.", "app.this_permanently_locks_the_current_phase_continue": "This permanently locks the current phase. Continue?", - "app.announcements_enabled": "Announcements enabled", "app.paused": " · paused", "app.paused_afa0b8": "Paused", "app.waiting_bade46": "Waiting", @@ -573,7 +572,7 @@ "phases.first": "Phase 1 · Turns 1-3", "phases.second": "Phase 2 · Turns 4-7", "phases.execute": "Execute the whole mission", - "phases.start": "Start the clock and place → in turn 1. Listen for the next announcement.", + "phases.start": "Start the clock and place → in turn 1. Watch for the next threat.", "phases.listen": "The clock advances; the ship waits. Threats are announced during planning.", "phases.revealed": "Threat revealed: it will arrive on execution turn 6. Place → in turn 1, then jump to the last 5 seconds of this phase.", "phases.locked": "Turns 1-3 are locked; the ship still waits. Place a deck change in turn 4, then ↵.", diff --git a/preview/locales/fr.json b/preview/locales/fr.json index d2339d4..1a1e80e 100644 --- a/preview/locales/fr.json +++ b/preview/locales/fr.json @@ -45,8 +45,8 @@ "app.basic": "basique", "app.heroic_move": "Déplacement héroïque · ", "app.heroic": "Héroïque · ", - "app.mute_voice_announcements": "Couper le son", - "app.enable_voice_announcements": "Activer le son", + "app.mute_sounds": "Couper le son", + "app.enable_sounds": "Activer le son", "app.serious_threat": "Menace sérieuse", "app.threat": "Menace", "app.internal": "interne", @@ -224,7 +224,6 @@ "app.card_unavailable": "Carte indisponible", "app.check_the_achievement_requirements_before_recording_it": "Vérifiez les conditions du succès avant de le valider.", "app.this_permanently_locks_the_current_phase_continue": "Les tours de cette phase seront définitivement verrouillés. Continuer ?", - "app.announcements_enabled": "Annonces activées", "app.paused": " · en pause", "app.paused_afa0b8": "En pause", "app.waiting_bade46": "En attente", @@ -573,7 +572,7 @@ "phases.first": "Phase 1 · Tours 1-3", "phases.second": "Phase 2 · Tours 4-7", "phases.execute": "Exécuter toute la mission", - "phases.start": "Lancez le chrono et placez → au tour 1. Écoutez la prochaine annonce.", + "phases.start": "Lancez le chrono et placez → au tour 1. Guettez la prochaine menace.", "phases.listen": "Le chrono avance ; le vaisseau attend. Les menaces sont annoncées pendant la préparation.", "phases.revealed": "Menace révélée : elle arrivera au tour 6 de l’exécution. Placez → au tour 1, puis avancez aux 5 dernières secondes de cette phase.", "phases.locked": "Les tours 1-3 sont verrouillés ; le vaisseau attend toujours. Placez le changement de pont au tour 4, puis ↵.",