voice
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
voice
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2emberline.audio.voice — turning the written script into spoken clips. `audio_gen.speech` is credit-metered (2 a call) and asynchronous, and every run lands its output at the SAME fixed path — `/zero/source/generated/audio/ asset.soundClip` — so a second generation overwrites the first before you have read it. Two consequences the whole builder is shaped around: * generations are SERIALISED, one at a time, and the mp3 is copied into its own named clip immediately; * the copy is only taken when the drop's `.metadata` names OUR run id, so a clip another slice generated at the same moment is never mistaken for ours. Every line is bought exactly once. A line whose clip already exists is skipped, so a hot reload, a rebuild or a second pass costs nothing.
dropRunId( ) → string
generate(entry: any, timeoutS: number?) → void
Generate one line and cache it. Returns the clip ref, or nil plus a reason.
| arg | type | description |
|---|---|---|
| entry | any | |
| timeoutS | number? |
buildMissing(limit: number?) → BuildResult
Build everything the script needs that is not already cached. `limit` caps how many are bought in one pass so a call stays short.
| arg | type | description |
|---|---|---|
| limit | number? |
master(targetPeak: number?, drive: number?) → any
The speech service hands back clips at wildly different levels — measured peaks between 0.31 and 0.70 across the script, and a voiced RMS spread of nearly 6 dB. An announcer who is quieter than the music on one call and over it on the next is not a mix. So every cached line is MASTERED once: a gentle soft-knee saturation to lift the body of the speech, then normalised to a common peak. Idempotent in practice because it is run once after a build.
| arg | type | description |
|---|---|---|
| targetPeak | number? | |
| drive | number? |
audit( ) → any
Report on the cache without generating anything: what exists, what does not, and whether each clip is real audio rather than an empty container.
BuildResult = {Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.