Log inGet started
World

First Light: Vagant

Branchmain
Branchesmain
Commit2ac9266a40

README.md

audio.voicebake

Author time only. Generates each line of audio.voice's script through audio_gen.speech, dresses it for its speaker, and files it as a .soundClip under /source/sfx/voice.

Nothing at play time requires this module: the game ships the baked lines, so a browser session generates nothing and a service that is down at play time is not a thing that can happen.

Generation is asynchronous and takes seconds, so it is two calls:

local vb = require("audio.voicebake")
local jobs = vb.start({ "open_comm_1", "open_comm_2" })   -- { key = jobId }
-- in a LATER call:
vb.finish(jobs)                                            -- one row per line

finish returns the status, the identity it filed, the speaker, the rate, the channel count, the duration and the peak — so a line that generated to silence is visible in the call that baked it.

The dressing is where the two speakers separate:

  • The Vagant — resampled to 24 kHz, 95 Hz to 6.8 kHz, a short damp room.
  • The Commissioner — resampled at 0.855 of speed, so a minor third down and slower with it; 175 Hz to 3.1 kHz, the range a speaking-trumpet passes; and a 2.6-second tail with no room to belong to.