Ask the Agent tool to create and run a voice client and connect to the Token Plan real-time voice conversation model.
Supported models
| Model | Capability |
|---|---|
qwen-audio-3.0-realtime-plus | Real-time voice conversation |
Prerequisites
- A Token Plan subscription. For the Personal Edition, get the
sk-sp-API key from My Subscription (Personal). For the Team Edition, assign a seat in Member Management, then get the API key. - Python 3.9 or later, a microphone, and speakers.
Step 1: Send the integration instruction to the Agent tool
Expand the integration instruction below and send it to the Agent tool you use. It reads the configured Token Plan key, installs dependencies, creates qwen_realtime_voice.py, and runs it. You do not need to configure the key manually or write Python.
Integration instruction (with voice client script)
Integration instruction (with voice client script)
On the first run, allow the app running the Agent tool (such as Cursor or Terminal) to access the microphone in system settings. Otherwise, the script receives no audio. Use headphones to prevent the microphone from capturing the model's audio and interrupting the response.
Step 2: Start the voice conversation
After the Agent tool starts the script, speak when you see the start message. The terminal shows the transcript and the model's reply, and the speakers play the model's audio. Press Ctrl+C to end the session.
The Agent tool installs dependencies, creates the script, and starts the session. Audio data travels between the local client and Token Plan and does not pass through the Agent tool's text model.
Save as a tool extension
To use the instruction again, ask the Agent tool to save it as a Skill, Slash Command, or Agent configuration for your current tool, then start it through that tool's trigger. Common tools and their extension mechanisms and paths:
| Tool | Extension mechanism | Configuration file path |
|---|---|---|
| Claude Code | Slash Command | .claude/commands/voice-chat.md |
| Codex | Skill | ~/.codex/skills/token-plan-voice/SKILL.md |
| Qwen Code | Skill | ~/.qwen/skills/voice-chat/SKILL.md |
| OpenCode | Agent | .opencode/agents/voice-chat.md |
| OpenClaw | Skill | ~/.openclaw/workspace/skills/token-plan-voice/SKILL.md |
| Hermes Agent | Skill | ~/.hermes/skills/media/voice-chat/SKILL.md |
| Qoder | Skill | ~/.qoder/skills/voice-chat/SKILL.md |
Limits
- With external speakers, the model's audio may be captured by the microphone and interrupt the response. Use headphones.
- Bash calls from the Agent tool have a timeout. For long conversations, run the script as a standalone process or wrap it in an MCP server.
- The current solution handles voice input and output only.