一键导入
voice-agent
Voice-to-agent flow: start recording, see live transcript, speak the wake word "spell" followed by a command, and the agent processes it automatically.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Voice-to-agent flow: start recording, see live transcript, speak the wake word "spell" followed by a command, and the agent processes it automatically.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Write system prompts, tool docs, and agent definitions. Combines research-backed prompt engineering (+15-30% measured improvements) with project XML conventions. Covers tag hierarchy, structural templates, high-impact interventions, anti-patterns.
Write and compile excellent Typst documents — brand-aware, component-driven, data-hydrated
Interactive wizard to bootstrap a .spell/ directory with spell-server configuration, Telegram bridge, autonomy goals, state stores, and optional memory system. Run in any project directory.
Headless QML integration testing using the bridge's DOM introspection, JS evaluation, and screenshot APIs. Use when writing or debugging QML UI tests.
Spawn a native QML canvas window to display structured data (tables, diffs, trees, markdown, images) and collect user input via prompts. Use when presenting comparisons, tabular data, large diffs, or multi-step decisions.
Generate brand asset variations (ad creatives, logos, mood boards) using gemini-image, display them in a native Qt QML gallery window, and let users rate/compare/regenerate without touching the terminal.
| name | voice-agent |
| description | Voice-to-agent flow: start recording, see live transcript, speak the wake word "spell" followed by a command, and the agent processes it automatically. |
Live voice transcription with wake-word detection. Say "spell" followed by your command — the agent processes it as if you typed it.
which sox (Linux: sudo pacman -S sox or sudo apt install sox).env fileWhen the user asks to start voice mode, use voice recording, or activate the voice agent:
import { isDisplayAvailable } from "@oh-my-pi/pi-qml";
import { $ } from "bun";
const hasSox = !!(await $`which sox`.nothrow().quiet().text()).trim();
if (!hasSox) {
// Tell the user to install sox and stop
}
if (!process.env.DEEPGRAM_API_KEY) {
// Tell the user to set DEEPGRAM_API_KEY and stop
}
if (!isDisplayAvailable()) {
// Tell the user display is unavailable and stop
}
canvas launch path=".spell/skills/voice-agent/voice-ui.qml" title="Voice Agent" width=520 height=360
Note the window id from the response.
bun run .spell/skills/voice-agent/voice-pipeline.ts
Run this as an async bash job — it runs indefinitely. Store the job id so you can kill it later.
The QML window emits two events via bridge.send():
voice_command{ "type": "voice_command", "text": "create a file called foo.ts" }
Process text as if the user typed it — relay it as the next user message for the agent to act on. The user spoke "spell create a file called foo.ts" and wants it executed.
voice_stop{ "type": "voice_stop" }
User clicked Stop. Clean up:
canvas close id=<window-id>voice-pipeline.ts captures mic audio via ffmpeg (raw PCM 16kHz/16-bit/mono via PulseAudio)UtteranceEnd (~1.5s silence)/tmp/spell-voice-state.json with status: "command_detected"read toolcommandId, the QML fires a bridge.send canvas event that triggers an agent turn| Symptom | Cause | Fix |
|---|---|---|
| No audio captured | Wrong audio device | Set AUDIO_DEVICE env var; check pactl list sources short |
| Deepgram auth error | Bad API key | Verify DEEPGRAM_API_KEY |
| Pipeline exits immediately | ffmpeg missing or ALSA error | sudo pacman -S ffmpeg |
| QML shows "Pipeline disconnected" | Pipeline process died | Check job output: read jobs://<id> for ffmpeg/Deepgram errors |
| QML shows error in red | Deepgram disconnect or audio fail | Pipeline auto-reconnects; if persistent, check API key and mic |
| QML shows nothing | State file not created yet | Pipeline needs a second to connect |
| Commands not firing | Wake word not recognized | Speak clearly; "spell" must be a full word |
The pipeline runs as an async bash job. If the transcript stays empty:
read jobs:// # list all jobs
read jobs://<id> # show stdout/stderr for the pipeline job
ffmpeg stderr is piped and printed to the job's stderr output, so device errors, permission issues, and format errors are visible there.