The Web Audio API is a powerful browser API for creating, manipulating and analysing audio. I'm no musician, so I'll leave the creating and manipulating to the experts. Instead, in this post we're going look at analysing audio. To make things extra interesting, we're going to see how to visualise the audio in a React component with <canvas> .

When we're done we'll have a React application that can listen to the microphone on your computer and show a waveform to visualise the data.

Getting started

We'll need Node.js to run the application, so make sure you have it installed. I've started the application for us, so follow these instructions to get it running: