Hermes plugin · reference
CHIRP
A chime when Hermes starts, a tick when a prompt leaves, a click for every tool, a sting when the turn lands, a buzz on failure, and a warp chirp when the model changes.
- 16 cues
- Windows · Linux · macOS
- MIT
- local only
- v0.28.4
How to install it, what every command and settings key does, how the Studio talks to the engine, and what to check when a cue doesn't play.
Contents12 sections
01 / Observer plugin
What it is
chirp plays a short WAV at each step of a Hermes session: a chime when it starts, a tick when a prompt goes out, a click for every tool call, a sting when the turn ends. It listens to lifecycle hooks and nothing else, and it plays from a local pack. The shipped pack has sixteen cues; a pack is a folder of mono 16-bit WAVs.
It only observes. Every hook returns immediately, every callback is wrapped, and playback runs on one daemon thread with a bounded queue. A missing file, a dead audio device, a malformed WAV or a bug in the morpher can't raise into Hermes or change a tool result; if something does go wrong, you get silence.
Surfaces decide where sound is allowed. The default is cli, tui and desktop; bots such as Telegram and Discord stay silent unless you add their platform name. Each surface can carry its own volume multiplier, each cue can be switched off, and profiles can swap the whole setup without overwriting the base layer. HERMES_CHIRP=0 is the hard kill switch.
02 / Install
Quick start
The plugin lives in the profile's plugin directory, under the folder name chirp. Copy the Python modules, the manifest, sounds/ and app/; packs/ is build material, not runtime.
1. Copy the plugin
cd ~\hermes-chirp
$plugin = "$env:HERMES_HOME\plugins\chirp"
New-Item -ItemType Directory -Force $plugin | Out-Null
Copy-Item __init__.py, chirp.py, chirp_dsp.py, plugin.yaml -Destination $plugin
Copy-Item sounds, app -Destination $plugin -Recurse
Use the $HERMES_HOME of the profile you actually run. The folder must be named chirp; the plugin loader uses the directory name.
2. Enable it once
hermes plugins enable chirp
3. Install the panel and tray
The panel and tray have their own venv. The installer uses uv, creates app\.venv with Python 3.11, installs pystray, pillow, tkinterdnd2 and numpy, registers HKCU\...\Run\ChirpTray, and starts the tray hidden. -NoAutostart and -NoStart skip either half. On Linux the panel also needs python3-tk and a pystray backend (XOrg or GTK).
The tray menu
Right-click the bird; it is the everyday surface, and the panel is one click away for deep configuration. Top level: a live status line, Sounds enabled, Profile, Sound set, Volume, Test sound, Silence, Alerts, Sound types, Surfaces, Advanced, Control panel and Quit.
- Profile lists auto, default and every saved profile; Sound set lists installed packs, rotation on/off, rotation sets, next set now, open folder and install.
- Volume has 0–100% presets plus ±10%; each pick auditions
prompt. Test sound plays any of the sixteen cues, runs a play-all tour, and mutes individual cues. - Silence sets quiet hours for 15/30/60/120/240 minutes, rest of today, or until 08:00, and clears them again.
- Alerts toggles the master and balloons, sets context/stall/repeat thresholds and per-kind switches. Sound types toggles the six event groups. Surfaces toggles each platform (or all surfaces).
- Advanced holds minimum gap, per-cue mutes, per-surface levels, morph presets, Start with Windows, open settings/folders, copy diagnostics, help and about. Items that need more open the panel on the matching tab.
Every tray write re-reads settings.json first and writes only the key it changed, into the profile that is playing, so the tray can never revert a Studio, CLI or panel edit. Changes made elsewhere appear in the menu within five seconds. The bird mark also ships as a Hermes pet (hermes pets), which animates beside the CLI prompt. Size presets live in tray > Bird, panel > View > Bird, and hermes chirp pet size tiny|small|medium|large|xl|<0.1-3> (/chirp pet size …); hermes chirp pet hide|show toggles it.
powershell -ExecutionPolicy Bypass -File "$env:HERMES_HOME\plugins\chirp\app\install_ui.ps1"
4. Check it and play one cue
hermes chirp doctor
hermes chirp play boot
doctor checks the audio backend, the pack directory, all sixteen expected WAVs, the panel palette's WCAG pairs, the live config and the HERMES_CHIRP kill switch. play boot forces one cue through the same path the hooks use; it ignores mute, surfaces and quiet hours, so it is the cleanest test of the audio chain.
A healthy doctor ends with All good. A missing cue is reported by name. A custom pack can be partial and still play because a missing cue falls back to tool_generic.wav, but the doctor will still call the gap a problem.
03 / Loopback console
The Studio
The Studio is a local web console over the same engine. It is a single HTML file served by chirp_studio.py; there is no build step, no npm, and no external asset.
hermes chirp studio
hermes chirp studio --port 8792 --no-open
The server binds 127.0.0.1. With no --port it takes an ephemeral port; --no-open stops the browser launch. It prints the full URL once, including the token, and blocks until Ctrl+C.
Every write goes through the same settings.json the panel and CLI use. Profile-scoped keys go into the active profile; pack_rotation and the auto rules stay top-level. The engine re-reads settings at most once a second, so a change lands in a running gateway without a restart.
The page opened from disk (app/studio.html) is a demo with sample data. The live page is the one the server prints.
| Page | What you do there |
|---|---|
| Sounds | Master volume and mute; the sixteen cue rows with on/off, level, trim, gap and morph preset; preview one cue; test the whole set; replace a cue's WAV (written to the active pack's custom/ and assigned to that cue); reset a cue. |
| Profiles | Use, create, duplicate and delete overlays; see each profile's volume and pack; edit auto rules against a live day plan. A new profile snapshots the effective layer. |
| Sound sets | Installed sets with cue counts, use/delete, the rotation switch and per-set checkboxes, the pack index URL, and install or reinstall with progress. Deletion is limited to user-installed sets. |
| Settings | Thinking tick, minimum gap, surfaces, quiet hours, the three alert thresholds and the pack library summary. The sidebar's Alerts item opens this page; alerts do not have a separate screen. |
settings.json the CLI reads.04 / Subcommands
Command reference
Every subcommand registered in __init__.py. Examples assume the plugin is enabled and hermes is on PATH. Unless a row says read-only, the command writes settings.json; profile-scoped keys go into the active profile, global keys into the base layer. play and test force playback; almost everything else respects the filters.
Core
| Command | Example | What it changes |
|---|---|---|
list | hermes chirp list | Read-only. Prints the playing pack, its sound names and a fixed event map. |
play <name> | hermes chirp play boot | Read-only. Force-plays one cue by stem; bypasses enabled, surfaces, per-cue mute, quiet hours and gaps. Prints played or could not play. |
test [name] | hermes chirp test done | Read-only. Plays every cue in the pack (or one named cue) with its duration, then done. |
doctor [--contrast] | hermes chirp doctor --contrast | Read-only. Checks the audio backend, pack dir, the sixteen expected stems, palette contrast, config and kill switch. --contrast prints the full WCAG table. |
volume [0-1] | hermes chirp volume 0.4 | Writes volume. No value prints the current level; a value is clamped to 0–1 and plays prompt as confirmation. |
ui | hermes chirp ui | No settings. Opens the Tk panel, or the tray if app\.venv exists. |
studio [--port] [--no-open] | hermes chirp studio --port 8792 --no-open | No settings until a page writes. Serves the local Studio; blocks until Ctrl+C. |
stats | hermes chirp stats | Read-only. Counts the last 5,000 lines of events.jsonl by hook and prints the top 15. |
trace on|off | hermes chirp trace on | Writes or removes the TRACE marker in the plugin folder. Hook lines go to $HERMES_HOME/logs/chirp-trace.log. |
diagnostics [--zip [PATH]] | hermes chirp diagnostics --zip | Read-only; optionally writes a zip. Prints doctor, recent alerts and events, and panel/tray tails. |
Config
| Command | Example | What it changes |
|---|---|---|
config get [key] | hermes chirp config get alerts.context_pct | Read-only. With no key, dumps the effective settings (defaults filled, active profile overlaid), with secret-looking keys masked. With a key, prints that value or (unset). |
config set <key> <value> | hermes chirp config set volume 0.35 | Writes. Dotted keys work (alerts.context_pct). on/yes/off/no become booleans; otherwise JSON is tried, then the raw string. Values are stored as given; playback clamps ranges. |
config unset <key> | hermes chirp config unset quiet_hours | Writes. Removes the key from the active profile (if it is a profile key and a profile is active) or from the base, so the code default applies again. |
Profiles and presets
| Command | Example | What it changes |
|---|---|---|
profile list | hermes chirp profile list | Read-only. default plus saved profiles, with * on the effective one. |
profile use <name> | hermes chirp profile use night | Sets active_profile. Does not copy values into the base. |
profile save <name> | hermes chirp profile save desk | Snapshots the effective values of the eighteen PROFILE_KEYS under <name> and makes it active. |
profile delete <name> | hermes chirp profile delete desk | Removes a saved profile; if it was active, active_profile returns to default. Auto rules that name it are removed too, same as the Studio. |
profile duplicate <src> <dst> | hermes chirp profile duplicate night late | Deep-copies a saved profile to a new name; the active profile is unchanged. |
profile rename <old> <new> | hermes chirp profile rename late night-owl | Renames a saved profile and updates active_profile and any auto rules that named it. |
preset list | hermes chirp preset list | Read-only. Prints the built-in preset names. |
preset install <name> | hermes chirp preset install focus | Builds a full profile from a preset, saves it, and activates it. |
Packs, events and alerts
| Command | Example | What it changes |
|---|---|---|
pack list | hermes chirp pack list | Read-only. * marks the playing set; each row says user or plugin. |
pack use <name> | hermes chirp pack use lofi-study | Writes pack in the active layer. The name must be installed. |
pack new <name> | hermes chirp pack new my-pack | Copies the current pack into $HERMES_HOME/chirp-packs/<name> and switches to it. |
pack delete <name> | hermes chirp pack delete my-pack | Deletes a user-installed pack only; default and shipped packs are protected. If it was playing, pack returns to default. |
pack rotate | hermes chirp pack rotate show | Read-only. Prints on/off, how many chosen sets are installed, and the next set. |
pack rotate on|off | hermes chirp pack rotate on | Writes pack_rotation.enabled at the base layer. |
pack rotate set <pack> ... | hermes chirp pack rotate set lofi-study ambient-drone | Writes the installed subset to pack_rotation.packs and enables rotation. Unknown names are ignored. |
pack rotate next | hermes chirp pack rotate next | Advances rotation.json now; this process plays the chosen set immediately, and the next session continues from there. |
event list | hermes chirp event list | Read-only. Numbered bindings with hook, field/regex, sound and cooldown. |
event add <hook> <sound> | hermes chirp event add post_tool_call tool_generic --field tool_name --regex "mcp__" | Appends an observer-hook binding. --field and --regex narrow the match; --cooldown-ms defaults to 500; --label is display text. |
event remove <n> | hermes chirp event remove 1 | Removes binding <n> (1-based). |
alert test | hermes chirp alert test | Writes a turn_failed alert to alerts.jsonl and plays error; bypasses that kind's rate limit, not the alerts master switch. |
Bindable observer hooks
post_tool_call pre_verify pre_auxiliary_call post_auxiliary_call
on_session_open on_session_reset on_session_finalize on_session_delete
on_skill_lifecycle subagent_stop agent_loop_stopped post_approval_response
on_human_input_request on_human_input_resolved
kanban_task_completed kanban_task_blocked post_curator_run
on_stream_start on_stream_end
These are the hooks chirp records and binds; they do not have built-in cues. The main lifecycle hooks already have their own sounds and are not the binding surface.
Slash commands
| Slash | Example | What it changes |
|---|---|---|
/chirp | /chirp | Read-only status: on/off, volume, pack, effective profile, sound count. |
/chirp on|off | /chirp off | Writes enabled in the active layer. |
/chirp volume <0-1> | /chirp volume 0.4 | Writes volume, then plays prompt. |
/chirp test | /chirp test | Plays prompt once. |
/chirp profile <name> | /chirp profile night | Sets active_profile. |
/chirp preset <name> | /chirp preset focus | Installs a preset as a full profile and activates it. |
/chirp pack <name> | /chirp pack lofi-study | Writes pack in the active layer. |
/chirp pack rotate ... | /chirp pack rotate next | Toggles rotation or advances it; next changes what this process plays. |
/chirp morph <preset> | /chirp morph ghost | Writes the global morph object from a preset. |
/chirp mute [topic] | /chirp mute tools | Sets the matching group flag to false. Topics: tools, turn, session, ui, model, think, all; no topic means all. |
/chirp unmute [topic] | /chirp unmute all | Sets enabled true, or the matching group flag true. |
05 / settings.json
Settings reference
settings.json is allowed to be sparse. with_defaults merges the file over DEFAULTS on every read, one level deep for nested objects, so a file containing only {"volume":0.35} still has every key when read. hermes chirp config get prints that merged view.
| Key | Type / default | What it does |
|---|---|---|
| Playback | ||
enabled | bool · true | Master switch. HERMES_CHIRP=0 overrides it. |
volume | float · 0.6 | Master gain, clamped 0–1, applied to samples before playback. |
min_gap_ms | int · 90 | Global floor between any two accepted cues, in milliseconds. |
per_sound | object · {} | Per-cue overrides. Each entry may carry enabled (true), volume (1.0), trim_ms (0) and gap_ms (220). |
morph | object · {pitch:0, tape:1, reverse:false, crush:16, echo:0, wobble:0, humanise:0} | Global morpher: pitch in semitones, tape speed, reverse, crush bit depth, echo mix, wobble depth, humanise in cents. |
per_sound_morph | object · {} | Per-cue morpher overrides, merged on top of the global object. |
assign | object · {} | Cue to filename. The engine looks in the pack root, then custom/; the Studio's Replace WAV writes there. |
quiet_hours | object · {"from":"","to":""} | Mute window in local time. Empty disables; a window may cross midnight. Alerts ignore it. |
session_sounds | bool · true | boot on plugin load and session start. |
turn_sounds | bool · true | prompt, done, error, stop. |
tool_sounds | bool · true | Per-tool clicks. |
model_sounds | bool · true | model warp on /model and when the running model changes. |
ui_sounds | bool · true | approval, subagent, compact. |
think_sounds | bool · false | think when a reply starts streaming; opt-in. |
| Surfaces | ||
surfaces | list · ["cli","tui","desktop"] | Platform names that get sound; all allows every surface. Bots stay silent unless listed. |
surface_volume | object · {} | Per-surface multipliers, for example {"tui":0.8}. Clamped 0–2 at play. |
| Alerts | ||
alerts | object · {enabled:true, balloon:true, context_pct:80, stall_min:5, repeat_min:10, kinds:{...}} | Alert master switch, tray balloons, thresholds and per-kind toggles. Detailed below. |
| Packs | ||
pack | string · "default" | Pack folder under the user root or the plugin's sounds/. A profile can carry its own. |
pack_index_url | string · "" | Alternative packs.json URL (http(s) or file) for the panel's library. Empty uses the built-in GitHub release index. |
pack_rotation | object · {"enabled":false,"packs":[]} | Rotate sound sets per session. Global, not captured in profiles. |
| Profiles | ||
profiles | object · {} | Saved overlays, name to object. Managed by the CLI, panel and Studio. |
active_profile | string · "default" | Chosen overlay. default means the base layer. |
auto_profiles | list · [] | Time windows that override active_profile; first match wins. |
| UI and events | ||
monitor | bool · true | Record observer-hook firings to events.jsonl for the live monitor and stats. |
events | list · [] | Custom observer bindings: {hook, field, regex, sound, cooldown_ms, enabled, label?}. |
Inside alerts
| Key | Type / default | What it does |
|---|---|---|
enabled | bool · true | Alerts fire at all. |
balloon | bool · true | Tray raises a balloon for warnings and errors. |
context_pct | int · 80 | Context alert at this percentage of the window. |
stall_min | int · 5 | Warn when a turn runs longer than this; 0 disables the timer. |
repeat_min | int · 10 | Per-kind rate limit, in minutes. |
kinds | object · all true | Per-kind switches: model_dropout, context, stall, intervention, turn_failed. |
model_dropout and turn_failed play error; context, stall and intervention play approval. Alerts ignore quiet hours.
Profile keys versus global keys
PROFILE_KEYS · 18
enabled · volume · min_gap_ms · surfaces · pack · session_sounds · turn_sounds · tool_sounds · model_sounds · ui_sounds · think_sounds · per_sound · morph · per_sound_morph · assign · quiet_hours · surface_volume · alerts
GLOBAL_KEYS · base only
profiles · active_profile · auto_profiles · events · monitor · ui_mode · pack_index_url · pack_rotation · window_geometry · ui_sections · hidden_tabs · sound_sort
PROFILE_KEYS are the eighteen keys a profile may carry. profile save snapshots exactly these. profile use only sets active_profile; it never writes the profile into the base. config set and the Studio write a profile key into the active profile when one is active, and into the base when default is active.
GLOBAL_KEYS stay at the top level. They are not captured by profile save, even if changed while a profile is active. The list includes the profile machinery itself, the event bindings and monitor, the pack index URL and rotation, and interface state that is not part of DEFAULTS (ui_mode, window_geometry, ui_sections, hidden_tabs, sound_sort).
The practical consequence: a profile can change pack but not pack_index_url; it can change alert thresholds but not the event monitor; switching profiles never reorders your packs or changes where the library comes from.
An unset key is not the same as a key set to its default. Unset falls through to the code default, which matters when that default changes. config unset removes the key; config get shows the value that would actually play.
config set.06 / Overlays and clocks
Profiles and auto rules
A profile is an overlay, not a copy. The base layer is always underneath; default means "use the base".
profiles is a dictionary of named objects. A profile saved by the CLI or Studio carries all eighteen PROFILE_KEYS; a hand-written partial object is also valid, because the engine does merged.update(profile) on read. Missing keys fall through to the base.
Using a profile sets active_profile and nothing else. Editing while it is active writes profile-scoped keys into that profile; the base stays untouched. profile save snapshots the effective values under a new name and makes it active. profile delete returns to default if the deleted profile was active, and removes auto rules that name it — same as the Studio.
Presets are built-in profiles: focus, morning, day, evening, night, late-night, gaming, cinema, retro, lofi, robot, chipmunk, deep, presentation, quiet-tools, everything, max-fun. preset install <name> expands one from DEFAULTS and saves the full snapshot.
Auto rules
auto_profiles is a list of windows. Each is {from, to, profile} with HH:MM times in local time. The engine checks rules in order and the first match wins; a rule with a bad time or a missing profile is skipped. A window where from is later than to wraps midnight. Auto beats active_profile while the window is open, and is re-evaluated on read (cached for at most a second), so no restart is needed when the clock crosses a boundary.
{
"profiles": {
"night": {
"volume": 0.25,
"tool_sounds": false,
"morph": { "pitch": -2, "tape": 1.0, "crush": 16,
"echo": 0.25, "wobble": 0.15, "humanise": 0 }
}
},
"active_profile": "default",
"auto_profiles": [
{ "from": "23:00", "to": "06:00", "profile": "night" }
]
}
The profile above is a partial overlay; every key it omits comes from the base. That is valid, and it is often the clearest way to write a night mode by hand.
default.07 / Folders and zips
Sound sets
A sound set is a folder. The format is deliberately plain: WAVs named after cues, plus optional metadata.
Layout
packs/lofi-study/
pack.json
README.md optional
boot.wav
prompt.wav
think.wav
...
stop.wav
The build script expects all sixteen stems in a pack it will publish: boot, prompt, think, done, error, model, tool_term, tool_write, tool_read, tool_net, tool_browser, tool_generic, approval, subagent, compact, stop. A local pack may be partial; a missing cue falls back to tool_generic.wav, and if that is absent too, playback stays quiet.
pack.json
{
"title": "Lofi Study",
"description": "Warm felt-piano cues with tape-soft edges.",
"tags": ["lofi", "study", "warm"],
"author": "Moddy",
"license": "MIT"
}
make-pack-index.py reads title, description and tags; the Studio reads title for its list. author and license are informational.
The index
{
"schema": 1,
"base_url": "https://example.com/packs/",
"packs": [
{
"id": "lofi-study",
"title": "Lofi Study",
"description": "Warm felt-piano cues with tape-soft edges.",
"tags": ["lofi", "study"],
"zip": "lofi-study.zip",
"bytes": 1304764,
"sha256": "<sha256 of the zip>"
}
]
}
schema must be 1. base_url must be http://, https:// or file://. Each entry needs a name-safe id and zip (letters, digits, dot, dash, underscore; the zip ends in .zip), and a sha256. bytes is checked when present. An entry without a SHA-256 is refused rather than trusted.
Build and publish
python tools/make-pack-index.py --base-url https://example.com/packs/
The script checks each packs/<genre>/ folder for the sixteen stems, writes <genre>.zip containing <genre>/pack.json and the WAVs, and rewrites packs.json with the zip's byte count and SHA-256. Host the zips and packs.json together, or point pack_index_url at a local file:// index.
Install checks
- Index shape. Schema 1, an allowed base URL, at least one valid pack. Path-like ids or zip names are dropped.
- Download. Hard cap 64 MiB; declared
bytesmust match; SHA-256 is mandatory and must match. Any failure deletes the temp file. - Archive. Valid zip, at most 512 members, at most 256 MiB total uncompressed, at most 32 MiB per member. Absolute paths and
..are refused; every member must live under<id>/; at least one WAV must exist at the pack root. - Install. Extracted into
$HERMES_HOME/chirp-packs/<id>/. A replace moves the old folder aside and restores it if the move fails.
These checks are the reason the Studio can install a pack from a URL without handing the archive to a general-purpose unzip.
Where packs live
Installed user packs live in $HERMES_HOME/chirp-packs/<pack>/. Shipped packs live in <plugin>\sounds\<pack>\. The engine searches the user root first, then the plugin root, so a user pack can shadow a shipped name. If HERMES_HOME is unset (tray autostart is the usual case), the user root is the chirp-packs folder beside the profile's plugins/ directory.
Installed packs survive plugin updates; the shipped sounds/ folder does not.
Rotation
Rotation is engine-side and per session. pack_rotation is global: {enabled, packs}. At on_session_start, if rotation is enabled and the surface is allowed, the engine reads rotation.json beside the settings file, picks packs[next % len], increments next, and plays that set for the rest of the process. Only installed names count. Silent surfaces do not advance the pointer, so a bot session does not consume a turn. pack rotate next advances immediately.
08 / JSON endpoints
Studio API
The Studio page is static HTML over a small JSON API. The server is ThreadingHTTPServer on 127.0.0.1; no framework and no external dependency.
| Method and path | Parameters | Returns |
|---|---|---|
GET /api/state | token | Full state: version, enabled, volume, profile, active_profile, auto, profiles, profile_list, pack, packs, pack_list, think, surfaces, min_gap, quiet, alerts, rotation, auto_rules, sounds. |
GET /api/pack/index | token; optional url | {url, base_url, packs:[...]}; each entry is annotated installed. Cached five minutes per URL. |
GET /api/pack/job | token; id | {id, pack, state, pct, message, folder?}; 404 for an unknown job. |
POST /api/settings | token; any of volume, enabled, think, min_gap, surfaces, quiet, alerts, pack, rotation, sound + sound_enabled/sound_level/sound_trim/sound_gap/sound_morph/sound_reset | Updated state. Numbers are clamped; unknown sound ids are ignored. |
POST /api/play | token; sound | {ok}. Force-plays through the live engine; ignores mute, quiet hours and surfaces. |
POST /api/profile | token; action (use, new, duplicate, delete), name, optional source | Updated state, or 400/404/409 with {error}. |
POST /api/auto_profile | token; rules list of {from, to, profile} | Updated state. Replaces the whole list; at most 24 rules; HH:MM and existing profiles only. |
POST /api/pack/install | token; id; optional url, replace | {job}. Download and extract run in a background thread; poll the job endpoint. |
POST /api/pack/delete | token; name | Updated state. Refuses default and the base active set; removes the set from rotation. |
POST /api/sound/file | token; sound; data (base64 or data URL); optional filename | Updated state with assigned. Requires RIFF/WAVE, caps at 10 MB, writes to the active pack's custom/. |
One write, full state back
{"token": "<current token>", "volume": 0.35, "sound": "done", "sound_level": 0.8}
The response is the full state, so a client can re-render without a second GET. Profile-aware writes: volume, enabled, think, min_gap, surfaces, quiet, alerts, pack and the per-sound fields land in the active profile. pack_rotation and auto rules are written at the base layer.
Surfaces are limited to twelve valid names, each 1–24 characters of a-z, 0-9, _ or -. Quiet hours are accepted only as a pair of HH:MM values or as two empty strings. POST /api/sound/file sanitises the filename, rejects anything without a RIFF/WAVE header, and returns the assignment it wrote.
09 / When a cue is silent
Troubleshooting
Start with hermes chirp doctor and hermes chirp play boot. The first checks the environment; the second bypasses every filter.
| Symptom | Check | What to do |
|---|---|---|
| No sound anywhere. | HERMES_CHIRP is not 0; enabled is true; volume is above 0; the current surface is in surfaces; the pack exists. | hermes chirp play boot forces the path. If it prints played boot and you hear nothing, check the Windows output device and its volume. If it prints could not play, the file is missing or the device refused it. |
| A gateway or bot is silent. | The default surfaces is cli,tui,desktop; bot platforms are not included. pre_tool_call carries no platform, so chirp resolves it from the session and stays silent for a session it has not seen. | Add the platform name (for example telegram) or all to surfaces; use surface_volume if you want that platform quieter. Sound always plays on the machine running the gateway, so a Desktop app pointed at a remote gateway plays there, not on the laptop. |
| No sound on Linux or macOS. | No player is installed, or it cannot reach the sound server. hermes chirp doctor names the backend it found, or the packages to install. | Install pulseaudio-utils (paplay), pipewire-bin (pw-play) or alsa-utils (aplay); macOS ships afplay. In WSL, audio goes through WSLg — run inside a WSLg session, not a bare SSH login. |
| The panel's preview is silent; the CLI is audible. | Both paths call the same play() → _buffer() → _wrap_wav(). SND_MEMORY needs a complete RIFF image, not raw PCM. Check that the panel and CLI load the same plugin copy and settings file; read panel.log. | Launch the panel from the same HERMES_HOME (and CHIRP_SETTINGS, if set). If you are on an old or forked build that hands raw frames to SND_MEMORY, update it; the current engine wraps the buffer and falls back to a temp file with SND_FILENAME. |
| A settings change does nothing. | The engine re-reads settings.json at most once a second. It may be reading a different file: CHIRP_SETTINGS wins over <plugin>\settings.json. A profile overlay can also hide a base value. Malformed JSON is renamed settings.json.corrupt-<timestamp> and defaults are used. | Run hermes chirp config get <key> to see the effective value; set it with hermes chirp config set, or use the Studio/panel pointed at the same settings path. Wait a second. Restore from settings.json.bak if a bad edit was renamed. |
| A pack install fails at SHA-256. | The sha256 in packs.json must match the exact zip; bytes must match too. An entry with no SHA-256 is refused. | Rebuild packs.json with python tools/make-pack-index.py --base-url ..., re-upload the zip, and retry. Use replace to reinstall over an existing folder; a failed download deletes its temp file. |
The Studio answers bad token. | The token is per process. The URL from an earlier run will not work after a restart; GET uses the query, POST uses the body. | Use the URL printed by the current hermes chirp studio. If you lost it, stop and start the command. |
| The Studio port is already in use. | --port is bound, or another Studio is running. | Omit --port to take an ephemeral port, or choose another. The bind is loopback-only. |
| A traceback mentions numpy. | numpy is optional. _scale_frames tries a float32 numpy path and falls back to _scale_frames_python; morph is always stdlib. | Nothing is required for playback. If you want the faster path, install numpy into the environment that runs the plugin; do not expect a morph change from installing it into the panel venv. |
RuntimeError: main thread is not in main loop in the panel. | Tk is main-thread only. Pack index and download workers post jobs to a queue drained by _pack_pump; a widget call from a worker raises this. | Close and reopen the panel, update to the current build, and attach panel.log to a report. Do not call Tk widgets from a thread or a plugin hook. |
| You want less motion. | The panel's hover feedback is a colour transition with no movement. The Studio honours prefers-reduced-motion. | Turn off Windows animations if you want no transitions; chirp's audio is unaffected. This page also disables smooth scrolling and transitions under the same preference. |
10 / Paths
Files and logs
Everything chirp owns lives under the plugin or under $HERMES_HOME/chirp-packs.
| Path | What it is |
|---|---|
plugin.yaml | Manifest: version, the thirty hooks, the config schema and the platform list. |
__init__.py | Registration, the hermes chirp CLI, the /chirp slash handler. |
chirp.py | Engine, player thread, hooks, rotation, memory bounds. |
chirp_dsp.py | Pure-stdlib morpher. |
sounds/default/ | The sixteen shipped WAVs. |
sounds/<pack>/custom/ | Replaced or assigned WAVs for that pack. |
app/chirp_settings.py | DEFAULTS, profile keys, presets, palette, contrast and dotted-key helpers. |
app/chirp_panel.py | Tk control panel. |
app/chirp_tray.py | Tray icon and alert balloons. |
app/chirp_studio.py | Studio server and JSON API. |
app/studio.html | Studio page; the off-disk copy runs on demo data. |
app/chirp_packs.py | Index validation, download, SHA check, zip-slip-safe extract. |
app/chirp_diag.py | Doctor lines, redaction, text and zip diagnostics. |
settings.json | The live settings file, beside the plugin or at CHIRP_SETTINGS. |
rotation.json | The rotation pointer, beside the settings file. |
$HERMES_HOME/chirp-packs/<id>/ | User-installed packs. |
packs/ | Pack build folders, zips and packs.json. |
tools/gate.py | One-command local gate. |
tools/make-pack-index.py | Zips pack folders and rewrites packs.json. |
Logs
| File | Contents and retention |
|---|---|
events.jsonl | One JSON line per observer-hook firing when monitor is on: ts, hook, fields. Trimmed at 512 KB, keeping the newest 400 lines. |
alerts.jsonl | One JSON line per alert: ts, kind, severity, message, detail. Trimmed at 256 KB, keeping the newest 400 lines. |
panel.log | The Tk panel's own log. Diagnostics include its last 200 lines. |
tray.log | The tray's import and runtime log. Diagnostics include its last 200 lines. |
<HERMES_HOME>\logs\chirp-trace.log | Hook trace lines when tracing is on. Falls back to the plugin folder if Hermes home is unavailable; HERMES_CHIRP_TRACE_FILE overrides the path. |
chirp-diagnostics-<time>.zip | Written only when requested, next to the plugin unless a path is given. |
Diagnostics
hermes chirp diagnostics
hermes chirp diagnostics --zip
hermes chirp diagnostics --zip C:\temp\chirp.zip
The zip contains diagnostics.txt, settings-redacted.json, alerts-tail.txt, events-tail.txt, panel-log.txt and tray-log.txt. Redaction masks any key matching key, token, secret or password, recursively.
settings.json.bak is the previous file before the last save. A corrupt file is renamed settings.json.corrupt-<timestamp> instead of being overwritten, so a bad edit is recoverable.
11 / Boundaries
Privacy and safety
Sound is decoration. It must never become a reason a turn fails.
- Local only. No telemetry, no analytics, no audio capture, no remote logging.
- Network. The only outbound calls are the pack index fetch and pack zip download (
urllib.request,http(s)orfile). The Studio binds127.0.0.1; it does not listen on a LAN address. - Sound cannot fail a turn. Hooks are observer-only, callbacks are wrapped, playback is queued on a daemon thread, and every failure is caught or logged. Missing files are quiet.
- Token per process. The Studio token is generated with
secrets.token_urlsafe(18), compared withcompare_digest, and only gates the API. Treat the printed URL as a local secret while the process runs. - Writes are explicit.
settings.json,rotation.json,events.jsonl,alerts.jsonl,panel.log,tray.log, custom WAVs in a pack, installed packs, and a diagnostics zip only when you ask. Nothing else. - Kill switches.
HERMES_CHIRP=0,enabled: false, a quiet-hours window, a surface not insurfaces, or a cue switched off.
12 / Internals
For developers
Four parts: an observer engine, one player thread, a buffer cache, and a morpher written against the standard library.
Hooks
| Hook | Cue | Notes |
|---|---|---|
plugin load | boot | Interactive CLI only, after a 0.8 s timer; hermes subcommands do not chime. |
on_session_start | boot | Rotates the set first when rotation is on and the surface is allowed. |
pre_llm_call | prompt / model | Prompt is skipped on the first turn. A changed model plays model and returns before the prompt cue. |
post_llm_call | done | Cancels the stall timer. |
on_session_end | error / stop | Failed plays error and records a turn_failed alert; interrupted plays stop. |
pre_tool_call | tool_* | Exact map, then prefix heuristics. Platform comes from the session map; an unknown session stays silent. |
api_request_error | error | Also records a model_dropout alert. |
post_api_request | — | Context alert at alerts.context_pct. |
pre_command | model / boot / compact / stop | /model; /new and /clear; /compact; /stop. |
pre_approval_request | approval | Also records an intervention alert. |
subagent_start | subagent | UI group. |
post_compaction | compact | UI group. |
on_stream_start | think | Only when think_sounds is true; platform from the session or the payload. |
other observer hooks | — | Recorded to events.jsonl when monitor is on; custom bindings may play. |
Player and cache
One daemon thread named chirp-player, one queue.Queue(maxsize=8). submit uses put_nowait; a full queue drops the cue instead of growing. On Windows the thread calls winsound.PlaySound(buf, SND_MEMORY | SND_NODEFAULT) and falls back to a temp .wav with SND_FILENAME; on Linux it writes the temp WAV and runs paplay, pw-play, aplay or ffplay; on macOS it runs afplay. On the next play(), a dead thread is replaced.
- The cache key is the resolved file path,
trim_ms, the seven-field morph tuple, the play-time pitch offset, and the file'smtime_nsplus size. Volume is not in the key. - The bound is 32 decoded-PCM entries, evicted least-recently-used. Volume is applied per play, and a settings change does not clear the cache; an entry is re-read after a minute, so a same-stamp replace heals.
- Session maps (
_models,_sessions) are capped at 512 entries with_remember. - Settings and effective views are re-read at most once a second.
DSP
Pure stdlib on mono 16-bit PCM. Effects run in this order: reverse → tape → pitch → crush → echo → wobble. pitch is semitones (the panel offers −12 to 12; the engine accepts −24 to 24), tape is a speed multiplier, crush is bit depth, echo and wobble are 0–1 mixes. humanise is not a morph stage: it picks a random pitch offset in cents at play time, which is why repeat cues are not identical. Morphs are capped at ten seconds and soft-limited to int16.
numpy, when importable, is used only for sample scaling; morph stays stdlib so the panel and engine sound the same.
Gates
python tools/gate.py
python -m unittest discover -s tests
py -3.11 -m ruff check __init__.py chirp.py chirp_dsp.py app tests tools --select F
tools/gate.py runs unittest discover -s tests, both Tk smokes, and — when hermes is on PATH — hermes plugins validate . and hermes chirp doctor --contrast. It runs every gate, counts failures, and exits non-zero if any fail. CI (.github/workflows/gate.yml) runs the unit tests and both smokes on Ubuntu with xvfb; it does not run the doctor (the runner has no audio device).
The static check used on this tree is the pyflakes floor. The broader ruff rules are dominated by deliberate blind excepts: a sound layer must never raise.