Tools for agents: Lossless WAV channel extractor

Extract a chosen audio channel into an actual mono WAV without mixing, resampling or changing sample values.

Connect with MCP

{
  "mcpServers": {
    "super-agent-tools": {
      "url": "https://app.getsupers.com/sites/agent-wav-channel/mcp"
    }
  }
}
Streamable HTTP · No API key · Stateless

Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.

Call extract_wav_channel

Send plain base64 uncompressed integer PCM WAV, mono or stereo, 8/16/24/32-bit. channel_index is zero-based: stereo channel 0 is conventionally left and channel 1 right; mono only has channel 0. Extracts interleaved sample bytes exactly. Output preserves sample rate, width and frame count and always has one channel. Container metadata is discarded and rebuilt. Decode audio_base64 to save the returned WAV. sha256 hashes the entire output; pcm_sha256 hashes raw selected samples. Public input budget: 524288 decoded bytes and 15 seconds. The compact example contains eight stereo frames with different left/right values. This is channel selection, not downmixing or vocal/source separation. No URLs or paths are accepted; audio is not persisted.

Input and output schemas
{
  "name": "extract_wav_channel",
  "title": "Lossless WAV channel extractor",
  "description": "Extract a zero-based PCM WAV channel into a mono WAV artifact, preserving sample bytes, frame count, sample rate and sample width.",
  "inputSchema": {
    "properties": {
      "audio_base64": {
        "title": "Audio Base64",
        "type": "string"
      },
      "channel_index": {
        "title": "Channel Index",
        "type": "integer"
      }
    },
    "required": [
      "audio_base64",
      "channel_index"
    ],
    "title": "extract_wav_channelArguments",
    "type": "object"
  },
  "outputSchema": {
    "additionalProperties": true,
    "title": "extract_wav_channelDictOutput",
    "type": "object"
  },
  "icons": null,
  "annotations": {
    "title": null,
    "readOnlyHint": true,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "meta": null,
  "execution": null
}

Run the example to see the actual result.

HTTP alternative

POST https://app.getsupers.com/sites/agent-wav-channel/call
Content-Type: application/json

{
  "audio_base64": "UklGRkQAAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAAZGF0YSAAAAAAEAAgAPAA4AAQACAA8ADgABAAIADwAOAAEAAgAPAA4A==",
  "channel_index": 1
}

The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.

A stereo channel is selected without mixing

Read the explanation

The compact saved example is a stereo PCM WAV with eight frames, sixteen-bit samples and an eight thousand Hertz sample rate. Decoding its sample bytes locally shows left values alternating plus and minus four thousand ninety-six, and right values alternating plus and minus eight thousand one hundred ninety-two. Channel index one selects the right sample bytes. The gold waveform copies those amplitudes exactly; it is not the average of the two channels. This worked example does not call the remote extraction tool. Each stereo frame contains two two-byte samples. Eight frames therefore contain thirty-two raw PCM bytes. Selecting one channel yields sixteen raw PCM bytes but still eight frames at the same sample rate. Duration remains one millisecond. The output WAV container is rebuilt, so its whole-file hash differs from the raw selected-sample hash and metadata is not preserved. The documented tool accepts plain base64 uncompressed integer PCM WAV, mono or stereo, with eight, sixteen, twenty-four or thirty-two-bit samples. Mono only permits channel zero. It preserves sample width, rate and frame count, with public size and duration budgets. It does not isolate vocals, mix channels or resample. No paths or URLs are accepted. Save audio by decoding returned base64; this offline preview has not received a remote output artifact.

Tools for agents: Lossless WAV channel extractor

How does this tool extract a single audio channel from a linear PCM WAV without resampling or data loss?

This tool extracts one specific channel from an uncompressed linear PCM WAV file and packages it into a valid single-channel (mono) WAV container. Instead of downmixing or modifying sample values, it slices the raw interleaved byte stream using frame stride arithmetic, retaining exactly the original bit depth, frame count, and sampling rate.

Only uncompressed integer PCM WAV audio (8, 16, 24, or 32 bits per sample) with 1 or 2 channels is supported; floating-point PCM and compressed codecs are rejected. Slicing discards custom RIFF chunks, comments, and non-audio metadata, and the public request budget restricts files to 524,288 decoded bytes and 15 seconds.

Try a worked example

Click "Run tool" with the default 8000 Hz, 16-bit stereo example containing 8 audio frames and channel_index set to 1. The structured result returns channels: 1, frames: 8, sample_rate: 8000, sample_width_bytes: 2, and duration_seconds: 0.001, providing a clean mono WAV stream and its matching SHA-256 integrity checksums.

Interleaved PCM Frame Slicing

In uncompressed multi-channel WAV files, audio samples are stored interleaved frame-by-frame. For an audio stream with channels c and sample width w bytes, each frame occupies a stride of c * w bytes. The byte slice for channel index k inside frame i starts at offset i * stride + k * w with length w. The extraction loop gathers these exact byte slices directly across all frames without floating-point conversion, dithering, or re-quantization.

The Python wave module reads and writes uncompressed linear PCM RIFF files, exposing frame rate, sample width, channel count, and uncompressed frame bytes. Rebuilding the mono WAV applies wave.open with parameters (nchannels=1, sampwidth=width, framerate=rate, nframes=0, comptype='NONE', compname='not compressed'), producing a standard RIFF header around the sliced byte stream. wave — Read and write WAV files — Python documentation

Integrity Verification and Constraints

The returned response includes two SHA-256 hashes: sha256 covers the complete generated RIFF/WAV binary artifact, while pcm_sha256 covers solely the raw concatenated audio sample bytes. Because the channel extraction operates as a pure deterministic byte slice, decoding audio_base64 yields an independent, verifiable mono WAV with unchanged sample values.

Sources and further reading