Speaker hello world

Play the smallest useful realtime graph through the system output.

npx web-audio-api speaker
-d, --duration <time>
run time (CLI accepts s/m/h suffixes; default: 2s)
ready

This is the minimal hello-world example for the Web Audio API in Node: an oscillator into a gain into the destination, playing through the system speakers with no browser involved. It is the smallest AudioContext example in this collection, and the same few lines also run unmodified in the browser.