Skip to main content
Sound is opt-in in Tuireel. You can add click and keypress effects that sync to your scripted actions, play a background audio track, or use a preset that includes sound.

Enabling Sound

Add the sound field to your config:
{
  "sound": {
    "effects": {
      "click": 1,
      "key": 1
    }
  },
  "output": "demo.mp4",
  "steps": [...]
}
Or use a preset that includes sound — polished and demo both enable click and key effects:
{
  "preset": "polished",
  "output": "demo.mp4",
  "steps": [...]
}

Sound Effects

Effects are triggered by step actions: click effects play on click steps, and key effects play on type and press steps.

Built-in Variants

Each effect type has 4 built-in variants (numbered 1-4):
{
  "sound": {
    "effects": {
      "click": 2,
      "key": 3
    }
  }
}

Custom Audio Files

Instead of a variant number, pass a file path to use your own sound:
{
  "sound": {
    "effects": {
      "click": "./sounds/my-click.mp3",
      "key": "./sounds/my-key.wav"
    }
  }
}
File paths are resolved relative to the current working directory.

Effects Volume

Control the overall volume of sound effects with effectsVolume (0 to 1, default 0.5):
{
  "sound": {
    "effects": { "click": 1, "key": 1 },
    "effectsVolume": 0.3
  }
}

Background Audio Track

Add a background music or ambient audio track with the track field:
{
  "sound": {
    "track": "./audio/background-music.mp3",
    "trackVolume": 0.2
  },
  "output": "demo.mp4",
  "steps": [...]
}
FieldTypeDefaultDescription
trackstringPath to audio file (relative to working directory)
trackVolumenumber0.3Track volume, 0 to 1
The track is trimmed to the video duration and fades out over the last 2 seconds.

Combining Effects and Track

You can use both effects and a background track together:
{
  "sound": {
    "effects": {
      "click": 1,
      "key": 1
    },
    "effectsVolume": 0.5,
    "track": "./audio/ambient.mp3",
    "trackVolume": 0.2
  },
  "output": "demo.mp4",
  "steps": [...]
}
Effects are mixed on top of the background track in the final output.

Full Sound Config Reference

FieldTypeDefaultDescription
effects.click1-4 or stringClick effect variant or custom audio path
effects.key1-4 or stringKey effect variant or custom audio path
effectsVolumenumber0.5Effects volume (0-1)
trackstringBackground audio file path
trackVolumenumber0.3Track volume (0-1)
Sound encoding requires ffmpeg. Effects are mixed using ffmpeg’s filter_complex pipeline and encoded as AAC (MP4) or Opus (WebM). GIF output does not support audio.

Presets with Sound

Two built-in presets include sound effects:
PresetEffects
polishedclick variant 1, key variant 1
democlick variant 1, key variant 1
The minimal and silent presets do not include sound.