Tools Used : p5.js
Let's start with a basic setup to record. Two buttons - one which records while it is pressed and another that plays back the recording.
Choose "allow" if you see the box like this.
Why am I dooing this?
This project is the very simple and basic stuffs with mic. However that we give the object visualized the sound of you will become to be a trigger that makes your voice accessible to every device. We can be avalable for a value that is gathered from your voice or sound around you.
Now, to actually create a mic and start recording into a file we need to create 3 p5 objects p5.AudioIn for the mic component, p5.SoundRecorder to record the input and p5.SoundFile to hold the recorded file. And we have to add functionalities into startRecord() stopRecord() and play() and voila!