audio_capture
Records audio output from a live Strudel session: start or stop streaming capture, or sample a fixed-duration window, and return base64-encoded audio.
Instructions
Record audio output from the live Strudel session. action=start begins streaming capture (optional format webm/opus, default webm). action=stop ends the stream and returns base64-encoded audio. action=sample captures a fixed-duration window in one call (100-60000ms, default 5000ms). Example: audio_capture({ action: "sample", duration: 3000 }). Audio must be playing for capture to record meaningful data. For MIDI export use export_midi; for runtime diagnostics use diagnostics. Each session has its own recorder, so captures in different sessions do not interfere (#180).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "audio_capture"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Capture action | |
| format | No | action=start: audio format (default webm) | |
| duration | No | action=sample: duration ms (100-60000, default 5000) | |
| session_id | No | Optional session ID (#108). Routes the capture to the named session, which has its own recorder — concurrent captures across sessions are safe (#180). | |
| maxDuration | No | action=start: stop the recorder automatically after this many ms. Defaults to 600000 (ten minutes); the recording so far is kept and returned by a later stop. |