2

According to this article the following code should work on OSX and Windows but doesn't mention Linux:

http://updates.html5rocks.com/2012/09/Live-Web-Audio-Input-Enabled

// success callback when requesting audio input stream
function gotStream(stream) {
    var audioContext = new webkitAudioContext();

    // Create an AudioNode from the stream.
    var mediaStreamSource = audioContext.createMediaStreamSource( stream );

    // Connect it to the destination to hear yourself (or any other node for processing!)
    mediaStreamSource.connect( audioContext.destination );
}

navigator.webkitGetUserMedia( {audio:true}, gotStream );

I downloaded Chrome Dev which is version: Version 25.0.1323.1 dev and it's not working.

I have the following flag enabled:

Web Audio Input Mac, Windows, Linux, Chrome OS
Enables live audio input using getUserMedia() and the Web Audio API.
Pickels
  • 33,902
  • 26
  • 118
  • 178
  • As far as I know it should work. Have you tried enabling this experimental feature in chorme://flags and then restarting chrome? – Joseph Adams Nov 15 '12 at 13:24
  • Yes, I did but I think it's not even needed anymore: https://sites.google.com/site/webrtc/blog/seeyouontheweb Are you using Ubuntu and is it working for you? – Pickels Nov 15 '12 at 13:28
  • No I'm not on Ubuntu, sorry. Besides that you have the wrong input method, I couldn't think of why it isn't working besides no built in support in the Linux version. I checked my install of Chrome (on Mac OSX) and in chrome-flags there is an extra flag **for Audio specifically**. – Joseph Adams Nov 15 '12 at 13:39
  • My question is to see if there is built in support for Linux. – Pickels Nov 15 '12 at 13:43
  • Have you checked the flags to see if you have the specific Audio flag/ enabled – Joseph Adams Nov 15 '12 at 13:46
  • Yes, I did as I said in my first comment. – Pickels Nov 15 '12 at 13:47
  • There probably is not support for Web Audio then. Maybe you need to build from source with that feature enabled... – Joseph Adams Nov 15 '12 at 13:49
  • I also face the same problem. https://groups.google.com/forum/?hl=en&fromgroups=#!topic/discuss-webrtc/b9Vmuo5znoo any success stories on windows (i didn't try yet on a Mac though)? Thanks, Ram – Ram Nov 22 '12 at 19:06
  • @RamsundarKandasamy no luck on windows 7 either. – Pickels Nov 24 '12 at 12:39

3 Answers3

1

As of chrome Version 24.0.1312.69 and Dartium Version 26.0.1403.0 (chromium derivative), I could not manage to make any demo from http://webaudiodemos.appspot.com/ using Live Input work on Ubuntu 12.10. I have the proper chrome://flags enabled.

For me it works fine on MacOS but it fails on Ubuntu using either a microphone or a USB camera. Ubuntu Sound Recorder works fine though so I know my hardware is working.

It would be nice to know whether it is supposed to work on Linux or when it is planned to be officially supported.

alextk
  • 5,713
  • 21
  • 34
1

I can verify this as well. Created ticket on the official Chromium bug tracker:

http://code.google.com/p/chromium/issues/detail?id=177862

Martin Konecny
  • 57,827
  • 19
  • 139
  • 159
1

Linux support for live audio was added in https://src.chromium.org/viewvc/chrome?revision=192893&view=revision.

Currently works on Google Chrome Version 28.0.1500.89 beta. Tested on Arch Linux.

ElDog
  • 1,277
  • 11
  • 19