Remove synthesized voice announcements

This commit is contained in:
coyotte508 2026-11-01 00:03:58 +01:00
commit 4aafa6c205
6 changed files with 12 additions and 30 deletions

View file

@ -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. 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 ## Implemented

View file

@ -58,4 +58,4 @@ The engine checks minimum levels before the run, successful completion, applicab
## Remaining validation and integration ## 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.

View file

@ -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. 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 ## Verification

View file

@ -57,7 +57,6 @@ export function mountConsole(root, host = null) {
replayFrame = null, replayFrame = null,
sound = true, sound = true,
combine = false, combine = false,
lastSpoken = 0,
basicsStarted = false, basicsStarted = false,
basicsPicked = false, basicsPicked = false,
basicsMarkup; basicsMarkup;
@ -175,8 +174,8 @@ export function mountConsole(root, host = null) {
function updateSound() { function updateSound() {
const button = $("#sound"); const button = $("#sound");
const description = sound const description = sound
? t("app.mute_voice_announcements") ? t("app.mute_sounds")
: t("app.enable_voice_announcements"); : t("app.enable_sounds");
button.title = description; button.title = description;
button.setAttribute("aria-label", description); button.setAttribute("aria-label", description);
button.setAttribute("aria-pressed", String(sound)); button.setAttribute("aria-pressed", String(sound));
@ -493,11 +492,6 @@ export function mountConsole(root, host = null) {
: announcements.length : announcements.length
? announcement(announcements.at(-1).event) ? announcement(announcements.at(-1).event)
: t("app.everyone_confirms_their_presence_before_launch"); : 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( $("#program-crew").innerHTML = Array.from(
{ length: view.crewSize }, { length: view.crewSize },
(_, i) => (_, i) =>
@ -992,14 +986,6 @@ export function mountConsole(root, host = null) {
$("#explorer-name").value = ""; $("#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) { async function command(type, extra = {}, target = seat) {
if (host) { if (host) {
if (target !== seat || seat < 0) if (target !== seat || seat < 0)
@ -1484,8 +1470,7 @@ export function mountConsole(root, host = null) {
sound = !sound; sound = !sound;
updateSound(); updateSound();
audio?.enable(sound); audio?.enable(sound);
if (sound) speak(t("app.announcements_enabled")); if (sound) cue("select");
else if ("speechSynthesis" in window) speechSynthesis.cancel();
} }
if (el.id === "ready-all") if (el.id === "ready-all")
perform(async () => { perform(async () => {
@ -1698,7 +1683,6 @@ export function mountConsole(root, host = null) {
for (const id of intervals) clearInterval(id); for (const id of intervals) clearInterval(id);
for (const [type, fn] of rootListeners) for (const [type, fn] of rootListeners)
root.removeEventListener(type, fn); root.removeEventListener(type, fn);
if (sound && "speechSynthesis" in window) speechSynthesis.cancel();
}, },
}; };
} }

View file

@ -45,8 +45,8 @@
"app.basic": "basic", "app.basic": "basic",
"app.heroic_move": "Heroic move · ", "app.heroic_move": "Heroic move · ",
"app.heroic": "Heroic · ", "app.heroic": "Heroic · ",
"app.mute_voice_announcements": "Mute sounds", "app.mute_sounds": "Mute sounds",
"app.enable_voice_announcements": "Enable sounds", "app.enable_sounds": "Enable sounds",
"app.serious_threat": "Serious threat", "app.serious_threat": "Serious threat",
"app.threat": "Threat", "app.threat": "Threat",
"app.internal": "internal", "app.internal": "internal",
@ -224,7 +224,6 @@
"app.card_unavailable": "Card unavailable", "app.card_unavailable": "Card unavailable",
"app.check_the_achievement_requirements_before_recording_it": "Check the achievement requirements before recording it.", "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.this_permanently_locks_the_current_phase_continue": "This permanently locks the current phase. Continue?",
"app.announcements_enabled": "Announcements enabled",
"app.paused": " · paused", "app.paused": " · paused",
"app.paused_afa0b8": "Paused", "app.paused_afa0b8": "Paused",
"app.waiting_bade46": "Waiting", "app.waiting_bade46": "Waiting",
@ -573,7 +572,7 @@
"phases.first": "Phase 1 · Turns 1-3", "phases.first": "Phase 1 · Turns 1-3",
"phases.second": "Phase 2 · Turns 4-7", "phases.second": "Phase 2 · Turns 4-7",
"phases.execute": "Execute the whole mission", "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.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.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 ↵.", "phases.locked": "Turns 1-3 are locked; the ship still waits. Place a deck change in turn 4, then ↵.",

View file

@ -45,8 +45,8 @@
"app.basic": "basique", "app.basic": "basique",
"app.heroic_move": "Déplacement héroïque · ", "app.heroic_move": "Déplacement héroïque · ",
"app.heroic": "Héroïque · ", "app.heroic": "Héroïque · ",
"app.mute_voice_announcements": "Couper le son", "app.mute_sounds": "Couper le son",
"app.enable_voice_announcements": "Activer le son", "app.enable_sounds": "Activer le son",
"app.serious_threat": "Menace sérieuse", "app.serious_threat": "Menace sérieuse",
"app.threat": "Menace", "app.threat": "Menace",
"app.internal": "interne", "app.internal": "interne",
@ -224,7 +224,6 @@
"app.card_unavailable": "Carte indisponible", "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.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.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": " · en pause",
"app.paused_afa0b8": "En pause", "app.paused_afa0b8": "En pause",
"app.waiting_bade46": "En attente", "app.waiting_bade46": "En attente",
@ -573,7 +572,7 @@
"phases.first": "Phase 1 · Tours 1-3", "phases.first": "Phase 1 · Tours 1-3",
"phases.second": "Phase 2 · Tours 4-7", "phases.second": "Phase 2 · Tours 4-7",
"phases.execute": "Exécuter toute la mission", "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.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.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 ↵.", "phases.locked": "Les tours 1-3 sont verrouillés ; le vaisseau attend toujours. Placez le changement de pont au tour 4, puis ↵.",