Voice mother with Carol and synchronize all call events

This commit is contained in:
Codex
2026-10-30 00:43:57 +02:00
parent 23d4e49468
commit eaefde2e07
124 changed files with 7903 additions and 2241 deletions
+44 -2
View File
@@ -104,18 +104,60 @@ func run(target: Node) -> void:
check(game.voice_stream(id) != null and game.voice_length(id) > 0.1, "Playable audio " + id)
var voices: Dictionary = JSON.parse_string(FileAccess.get_file_as_string("res://data/voice_manifest.json"))
var jessica_count := 0
var carol_count := 0
for id in game.story.lines:
if game.story.lines[id].speaker == "Катя":
check(voices[id].provider == "ElevenLabs" and voices[id].voice_id == "cgSgspJ2msm6clMCkdW9", "Jessica assigned: " + id)
jessica_count += 1
else:
check(voices[id].provider == "Windows Speech / draft", "Mother voice preserved: " + id)
check(voices[id].provider == "ElevenLabs" and voices[id].voice_id == "5u41aNhyCU6hXOcjPPv0", "Carol assigned: " + id)
carol_count += 1
check(jessica_count == 48, "All 48 Katya lines use Jessica")
check(carol_count == 54, "All 54 mother lines use Carol")
check(game.voice_length("greeting") <= game.story.intro[0].at, "Greeting fits before prologue")
check(45 + game.voice_length("power") <= 51, "Blackout reaction fits before conversation resumes")
check(85 + game.voice_length("hum") <= 90, "Hum reaction fits before strike")
for index in range(game.story.intro.size()):
var beat: Dictionary = game.story.intro[index]
var next_at: float = game.story.intro[index + 1].at if index + 1 < game.story.intro.size() else 85.0
if float(beat.at) < 45: next_at = minf(next_at, 45)
check(float(beat.at) + game.voice_length(beat.line) <= next_at, "Intro line fits before next cue: " + str(beat.line))
await capture("phone-menu")
click("settings")
await capture("phone-credits")
click("back_menu")
# Every redial repeats the same external world, including the first call.
for number in range(1, 11):
start(number)
at(23.99)
check(not game.fired.has("alarm"), "No early siren: " + str(number))
at(24.01)
check(game.fired.get("alarm") == 24.0, "Same siren time: " + str(number))
at(44.99)
check(not game.fired.has("power") and "темно" not in game.place_label.text, "Lights stay on until 45: " + str(number))
at(45.01)
check(game.fired.get("power") == 45.0 and "темно" in game.place_label.text, "Same visible blackout: " + str(number))
check("power" in game.heard, "Mother acknowledges blackout: " + str(number))
at(84.99)
check(not game.fired.has("hum"), "No early hum: " + str(number))
at(85.01)
check(game.fired.get("hum") == 85.0, "Same hum time: " + str(number))
at(89.99)
check(not game.impacted, "No early strike: " + str(number))
finish("flat")
check(game.fired.get("impact") == 90.0, "Same strike time: " + str(number))
start(1)
at(45.01)
await capture("phone-first-blackout")
start(2)
at(45.01)
await capture("phone-second-blackout")
start(2)
at(38)
click("keys_search")
at(45.01)
check(not game.busy.is_empty() and "power" not in game.heard, "Blackout does not interrupt an unrelated spoken task")
check(game.fired.get("power") == 45.0 and "темно" in game.place_label.text, "Busy task cannot postpone blackout")
for number in range(1, 11):
start(number)
check(game.chapter == number and game.place == "flat" and game.items.is_empty(), "Fresh chapter " + str(number))
@@ -124,7 +166,7 @@ func run(target: Node) -> void:
check(game.action_button("keys_search") == null, "Prologue has no commands")
check(game.clock_label.text == "Разговор", "Prologue hides time")
for beat in game.story.intro: at(beat.at + 0.01)
check(game.heard.size() == 10, "All ordinary conversation lines")
check(game.heard.size() == 11 and "power" in game.heard, "Ordinary conversation and blackout acknowledgement")
else:
var entry: Dictionary = game.story.chapters[number - 1]
var opening_at: float = game.events[0].at