Skip to content
Version v0.35 ยท supported
[WIP] Pending copyedit and approval.

Tuning recognition

Most recognition complaints come down to two knobs in engine.toml: how loud a sound has to be before Amri treats it as speech, and how long Amri waits after you stop talking before it fires the command. This page explains both and maps them to the symptom you are hearing.

Both live in engine.toml, the engine's own configuration file. It is seeded on first launch and never overwritten on upgrade, so edits are safe.

Voice-activity detection (VAD)

Voice-activity detection (VAD) is the gate that decides whether an incoming audio frame is speech worth sending to the recognizer, or room noise to ignore. The vad_threshold key sets how loud a frame must be to pass the gate. It is a top-level key (not inside any table), a normalised value from 0.0 to 1.0, and it defaults to 0.02.

# engine.toml, top level, not under any [table]
vad_threshold = 0.04
Symptom Change Effect
Triggers on background noise Raise vad_threshold A frame must be louder to count as speech, so quiet noise is ignored
Does not hear you Lower vad_threshold Quieter speech passes the gate

The default of 0.02 suits a close-talk headset in a quiet room. Raise it for a noisy room or an open desk mic. Setting vad_threshold = 0.0 disables the energy gate entirely: every frame reaches the recognizer. Values outside 0.0 to 1.0 are rejected at load.

Mic level comes first

If Amri does not hear you, check the input device and its level before lowering the threshold. See Audio.

Endpointer latency

The endpointer decides when an utterance is finished. Its t_end value is the felt-latency lever: the trailing silence, in seconds, that Amri waits after you stop speaking before the command fires. It lives in the [endpointer] table and the shipped default is 0.05.

[endpointer]
t_end = 0.05
t_start_max = 10.0
t_max = 30.0
Symptom Change Effect
Feels laggy Lower t_end The command fires sooner after you stop speaking
Fuses two quick commands into one Raise t_end slightly A short gap between commands is read as two utterances, not one

t_start_max (the longest Amri waits for speech to begin, default 10.0) and t_max (the longest single utterance, default 30.0) are bounds that rarely need tuning. Both are in seconds and must be positive.

The t_end default was chosen by measurement to balance responsiveness against fusing rapid commands. Change it only if you have a reason: too low and chained commands merge, too high and every command feels sluggish.

t_end is required inside the table

If you add an [endpointer] table, you must set t_end. A table with only t_start_max or t_max is rejected at load. To keep the tuned default, leave the whole table out.

  • Audio: choosing the input device and setting its level.
  • Recognition: how spoken patterns become commands.