Electron-vue achieve recording function by WebAudioApi, and converted to mp3 format, real-time monitoring audio equipment change

 

The following functions:

1, detects the current audio environment, whether to support the recording (WebAudio Api);

2, takes input output device list, the computer acquires the default audio device;

3, audition function, by analyzing the recorded sample data, determines whether the recorded sound;

4, real-time monitor the recording process, recording the sound waves from the sample showing fragments;

5, the change monitored in real time audio devices, there are given the respective feedback devices inserted or withdrawn;

6, generating a wav file;

7, support the conversion to mp3 format, because it is synchronous conversion, according to all scenarios need to use webworker or create a child process to asynchronous conversion.

Description:

1, item recently too busy, can not spare time to properly sort out the whole process, fear for too long time to forget the past, simply record it (from the blog contents could see);

2, the project is finishing a hurry, something business-related deleted, leaving only the overall logic, ran together to achieve the above functions is no problem, but the code looks a little rough, and if the reference, according to needs specific business and then refine, optimize;

3, there is clear mention of direct issue, went to the new mission, is not expected to re-refine the content of the blog.

Project Address: https://github.com/luohao8023/recorder-electron-vue , Develop branch

Guess you like

Origin www.cnblogs.com/kakayang/p/11444991.html