Mock Scene Audio
A pleasant tone instead of a voiceover, for smoke tests
- AUDIO
MockSceneAudio is the audio twin of KokoroSceneAudio, and it's a beautiful little trick: same inputs, same output shape, but instead of running an 82M-parameter TTS model it synthesizes a short sine tone. You swap it in while you're building the story pipeline, get instant audio that flows through every save and compile node, then swap the real TTS back in when you're ready to hear actual words.
It lives in the Story JSON Nodes pack (stepan-bogatorjov/comfy_scenes_json_node), and the point of the drop-in design is that you never rewire the graph. The tone's length approximates how long the spoken text would take (roughly 15 characters per second), and its pitch tracks which voice you picked - female voices sit higher, male voices lower, and the pitch control shifts it in semitones exactly like a real pitch shift. So even the mock gives you useful feedback about timing and character feel, not just a beep.
How it works
The node estimates a duration from the text length divided by the speed, picks a base frequency from the voice's gender prefix (*f_ female, *m_ male), applies your semitone shift, adds a fifth harmonic and a little per-call jitter, then fades the edges so it doesn't click. It returns the same AUDIO dict shape as KokoroSceneAudio - {"waveform": [1, 1, N], "sample_rate": 24000} - so every downstream node behaves identically. Empty text returns half a second of silence rather than crashing.
Inputs and output
- text - what the narration would say; drives the tone's length.
- voice - the same 28-voice Kokoro dropdown (default
am_michael). Changes the tone's pitch. - speed - 0.5–2×; changes the duration.
- pitch - −12 to +12 semitones.
- voice_name - optional; friendly names like "Heart" or "Child" resolve through the same mapper KokoroSceneAudio uses.
- Output AUDIO - wire into SaveAudioPassthrough to land it as
scene_NNNN.wav.
Install
The rare mock with zero extra dependencies - no kokoro package, no model download:
cd ComfyUI/custom_nodes
git clone https://github.com/stepan-bogatorjov/comfy_scenes_json_node
Restart ComfyUI (or install via Manager under "Story JSON Nodes").
Troubleshooting
The usual mistake is leaving it in. MockSceneAudio is a test fixture: a tone is not narration, and if you finalize a project with it, your voiceover folder will contain pleasant hums. When you're done iterating, swap this node for KokoroSceneAudio (same sockets, no rewiring) or the API-backed TTS that this pack's pipeline normally uses. One thing to know: because it regenerates every execution by design, running the same inputs twice gives slightly different tones - that's intentional, so repeated scenes don't sound identical.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| voice | COMBO | am_michael | 28 options: af_heart, af_alloy, af_aoede, af_bella, af_jessica, af_kore, +22 |
| speed | FLOAT | 1.000.5–2 | — |
| pitch | FLOAT | 0.0-12–12 | — |
| voice_nameopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |