Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to record audio in a Chrome Extension?

What's the simplest way to setup a chrome extension to record audio from the microphone?

  • I see there is a working experimental speech input API but how come you don't have access to the recorded file? Seems like hooking up into that should be simple enough, as it's a step earlier in the process, no? Especially as there is also a text-to-speech API, so you could effectively record into text and then have the computer speak it back out, but unless you want a standard voice, how lame, redundant and prone to error is that?

  • Then there seem to be flash solutions like this but how can I use that in a chrome extension without having to setup anything server-side? (since I don't actually need to send anything to a server--it's all local and client-side)

  • Is NPAPI a possibility? Is there such a plugin ready-made?

Don't know of other possible alternatives (HTML5 isn't ready yet, it seems) but I welcome anything functional and simple to implement and hook into a chrome extension.

like image 735
Vic Goldfeld Avatar asked Nov 30 '11 15:11

Vic Goldfeld


People also ask

Is there a Chrome extension for voice recording?

Reverb Record Reverb is a handy Chrome extension that allows you to record and share your voice notes online.

How do I record a Chrome extension?

Bring it up with Command+Shift+5, select the area or app you want to record, and switch to record mode by clicking “Record Selected Portion” on the right of the menu. Click the record button to start capturing a video.


2 Answers

Finally a native solution appeared: Introducing getUserMedia

like image 113
Vic Goldfeld Avatar answered Sep 30 '22 12:09

Vic Goldfeld


You cannot use the speech input API, since it will record only the microphone. Okay, you can grab the speakers like that, but it's clearly not the solution. Using a NPAPI plugin is a solution. You'll can identify the sound made by a particular tab and after record that source, but it is no longer web dev.

like image 31
Gaël Barbin Avatar answered Sep 30 '22 11:09

Gaël Barbin