This sample shows how to perform processing on an audio stream using the experimental insertable streams API. It applies a low-pass filter in realtime to audio recorded from a microphone and plays it back.
Warning: if you're not using headphones, pressing Start will cause feedback.
View the console to see logging. The audio
, processor
,
generator
, transformer
, stream
and
processedStream
variables are in global scope, so you can inspect them from the
console. You may also adjust the level of filtering by assigning to cutoff
.
Note: This sample is using an experimental API that has not yet been standardized. As
of 2021-02-09, this API is available in Chrome M90 if the experimental code is enabled on
the command line with
--enable-blink-features=WebCodecs,MediaStreamInsertableStreams
.