export_audio
Records a live Strudel audio window and writes it to a WAV or WebM file, returning the saved path and recording details while reporting silent captures instead of creating a silent file.
Instructions
Record a window of live Strudel audio and write it to a file. Returns a path plus what was actually recorded, not a wall of base64 — prefer this over audio_capture when you want the audio to exist somewhere. format=wav (default) decodes to 16-bit PCM a DAW will open; format=webm writes the raw Opus recording. Reports silent captures instead of writing a silent file and claiming success. Audio must already be playing: call playback({ action: "play" }) first. Example: export_audio({ duration: 4000, filename: "take-01" }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output format (default wav) | |
| output | No | file (default) writes to disk and returns a path; base64 returns bytes inline | |
| duration | No | Window to record in ms (100-30000, default 5000) | |
| filename | No | Output filename; reduced to a basename and confined to the export directory | |
| 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). |