Pipe PCM to stdout
Send raw PCM from an AudioContext to any Node writable stream.
ready
node examples/pipe-stdout.js | ffplay -f s16le -ar 44100 -ac 2 -Loading source…
- Graph
- Audio graph → sinkId Writable → aplay/ffmpeg/sox
- Input
- Audio graph
- Output
- 16-bit interleaved PCM
This streams raw PCM audio straight from an AudioContext to any Node writable stream, so it can be piped to aplay, sox, or ffplay from the command line. It is a Node-only adapter with no browser equivalent, since a browser page has no process.stdout to pipe into.