Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome extension to listen and capture streaming audio

Is it possible for a Chrome extension to listen for streaming audio from any of the browser's tabs? I would like to capture the streaming audio data and then analyse it.

Thanks

like image 411
OneDimensionalmc Avatar asked Mar 19 '13 21:03

OneDimensionalmc


People also ask

How do I record streaming audio in Chrome?

Chrome Extension Audio Recorder FAQsDownload Chrome Audio Capture and launch the same from the Chrome Web store. Open the tab you need to record from. The extension adds a record button close to the URL bar. Click on 'Start Capture from the pop-up window.

How do I record audio from a streaming video?

To record streaming or online audio online for free, you can count on Online Voice Recorder. It is a simple and easy online tool that you can use right in your browser. It allows you to record online audio using a microphone and save the recording file as an MP3 file.

Does Chrome screen capture record audio?

Main Features of Screen Recorder: ✔ No watermark ✔ Unlimited screen recording time ✔ Easy-to-use controls ✔ Instant video saving ✔ Multifunctional Screen Recorder ✔ Microphone & System sound recorder - Enabling you to record system sound, microphone, or to record both audio sources at the same time.

Is there an app to record streaming audio?

Audacity. Audacity is a free streaming music recorder with basic editing features, and it lets you record both system audio and microphone sound. It is handy if you do not have a Stereo Mix option on your computer.


1 Answers

You could try 3 ways, neither one does provide 100% guarantee to meet your needs.

Before going into more detailed descriptions, I must note that Chrome extensions do not provide convenient tools for working on per connection level - sufficiently low level, required for stream capturing. This is by design. This is why the 1-st way is:

  1. To look at other browsers, for example Firefox, which provides low-level APIs for connections. They are already known to be used by similar extensions. You may have a look at MediaStealer. If you do not have a specific requirement to build your system on Chrome, you should possibly move to Firefox.

  2. You can develop a Chrome extension, which intercepts HTTP-requests by means of webRequest API, analyses their headers and extracts media urls (such as containing audio/mpeg MIME-type, for example, in HTTP-headers). Just for a quick example of code you make look at the following SO question - How to change response header in Chrome. Having the url you may force appropriate media download as a file. It will land in default downloads folder and may have unfriendly name. (I made such an extension, but I do not have requirements for further processing). If you need to further process such files, it can be a challenge to monitor them in the folder, and run additional analysis in a separate program.

  3. You may have a look at NPAPI plugins in general, and their streaming APIs in particular. I can imagine that you create a plugin registered for, again, audio/mpeg MIME-type, and receives the data via NPP_NewStream, NPP_WriteReady and NPP_Write methods. The plugin can be wrapped into a Chrome extension. Though I made NPAPI plugins, I never used this API, and I'm not sure it will work as expected. Nethertheless, I'm mentioning this possibility here for completenees. This method requires some coding other than web-coding, meaning C/C++. NB. NPAPI plugins are deprecated and not supported in Chrome since September 2015.

Taking into account that you have some external (to the extension) "fingerprinting service" in mind, which sounds like an intelligent data processing, you may be interested in building all the system out of a browser. For example, you could, possibly, involve a HTTP-proxy, saving media from passing traffic.

like image 167
Stan Avatar answered Oct 18 '22 20:10

Stan