No live audio input: [object NavigatorUserMediaError] - html

I am trying out the example given here https://github.com/mattdiamond/Recorderjs - example_simple_exportwav.html. But, I am getting this error
No live audio input: [object NavigatorUserMediaError]
I am on WindowsXP and have enabled WebAudio for Chrome (Version 24.0.1312.56 m). What could be the problem?

I ran into this same issue, with the same example. Turns out you have to be serving the page from an HTTP server, as Chrome won't allow the audio input from a "file:///" page. An easy way to accomplish this, if you have Python installed, is to run the following in the directory containing the example file:
python -m SimpleHTTPServer
Now, point Chrome localhost:8000 and the example should work.

Hello you have to run it in HTTPS not HTTP.
When you are in https, the browser ask you for the permission of the microphone.
Hope you find this helpful.

Related

npm http-server downloads index.html instead of serving

I am using http-server with ssl certificate in order to test facebook instant games. However, while server is running localhost makes my browser download index.html file instead of actually serving it in a browser. The problem occures in chrome, but microsoft edge seems to be fine.
Use this URL http://127.0.0.1:8080/
instead of localhost:8080
I found out this problem only occurs in Chrome, edge seemed to work fine, so I decided to clear browsing data in the chrome settings and tried again and surprisingly it doesn't download index.html from localhost:8080 anymore! This method solved my issue.

Chrome 39 renders a compiled Dart app as blank

I am using Dart 1.8.3, Windows 8.1, Chrome 39.0.2171.95 m
Build a sample Polymer app from File > New Project dialog and chose polymerapp. It works fine in Dartium.
Compile to JS. Works fine in Firefox, but only shows a blank page in Chrome:
Searched here for some relevant topics and still getting nowhere. Would appreciate hints and guidance.
I guess this is because you need to start Chrome with --allow-file-access-from-files in order to be able or load local files.
Alternatively try to load the page from pub serve which does Dart2JS compilation on the fly (launch the page from DartEditor and then copy the URL from Dartium to Chrome).
Use any web server Python simplehttpserver or create on in Dart with a few lines of code.
I did the following test: deploy the build directory into my web server and it works fine. Thanks for the hint from Zochbauer that leads me to this.
In my view, this problem is more or less solved.

Opening downloaded Gist folder to inspect elements

I want to experiment with Mike Bostock's stacked bar chart (https://gist.github.com/3886208) in my browser using web inspector. I realize that I need a local copy of the example files (the index.html and the data.csv file) in order to play with it. However, when I download the 'gist' folder and open the index.html file with Chrome, the chart doesn't appear. What am I doing wrong?
Thanks!
With Google Chrome, go to Top Menu > View > Developer > Javascript console. You will see a message
XMLHttpRequest cannot load file:///path/to/data.csv. Cross origin requests are only supported for HTTP.
As per https://github.com/mbostock/d3/wiki
When developing locally, note that your browser may enforce strict
permissions for reading files out of the local file system. If you use
d3.xhr locally (including d3.json et al.), you must have a local web
server. For example, you can run Python's built-in server:
python -m SimpleHTTPServer 8888 &
Once this is running, go to http://localhost:8888/.

HTML 5 GeoLocation in Google Chrome

I am using HTML 5 Geolocations API's for tracking location however I am getting the following error on the Geolocation icon in Chrome Browser
"This Page has been blocked from tracking your Location"
I went to the Preferences and Setting's Page but did not find any help.
In my case the problem was that I opened the HTML file from the file system (file:///...). Browsers generally try to prevent accessing personal information (which includes location) from local files, so you have to serve the file through a web server (even if it is local).
One simple way to serve a static website located in your filesystem is SimpleHTTPServer if you have Python installed. Just navigate to the folder using the command prompt, and say python -m SimpleHTTPServer, and then you can view the file on localhost:8000.
Even I was facing the same problem. One of the solution is to open to file in another browser, I tried in Firefox and it worked fine. Another solution is to open the file through your WAMP server (Local host).
There is a good article here about Geolocation API. You have to go to chrome://settings/content and there, you can find Location information. You should be able to find the exceptions and manage them there.

Google Translate TTS problem

I'm testing with a simple HTML file, which contains:
<audio src="http://translate.google.com/translate_tts?tl=en&q=A+simple_text+to+voice+demonstration." controls autoplay>
with Chrome v11.0.696.68 and FF v4.0.1. I'm going through a proxy server and it doesn't work. Nothing gets played and clicking on the play button doesn't work in Chrome. In FF it flashes and then shows an 'X' over the control. The error logs don't show anything.
So I've broken down the steps:
Typing the URL into either browser works
wget -q -U Mozilla -O /tmp/tts.mp3 "http://translate.google.com/translate_tts?tl=en&q=Welcome+to+our+fantastic+text+to+voice+demonstration." gets me a file that plays fine on both browsers.
If I serve this file from my local web server it works fine (i.e. one that doesn't go through the proxy). i.e. src="http://localhost/tts.mp3"
I'm stumped. If the proxy were the problem then wget and address bar access shouldn't work. If the src being a URL were the problem then it shouldn't work from my local server.
Any clues? suggestions?
The reason this isn't working is most likely because translate.google.com restricts certain types of requests to prevent the service from being overloaded. For instance, if you use wget without the "-U Mozilla" user agent option you will get an HTTP 404 because the service restricts responses from wget's default user agent string.
In your case, it looks like what is going on is that translate.google.com is returning a HTTP 404 if a HTTP Referrer is included in the request. When you run wget from command line there is no referrer. When you use the audio tag from within a webpage, an HTTP Referrer is provided when requesting the translation. I just tried the following and got a 404.
wget --referer="http://foo.com" -U Mozilla -O /tmp/tts.mp3 "http://translate.google.com/translate_tts?tl=en&q=Welcome+to+our+fantastic+text+to+voice+demonstration
However if you take the --referer option out, it works.
The service is working here (11-NOV-2011) but is limited to 100 characters. You can split your text into 100 char chunks, download the mp3 result for each chunk and then join the chunks for the final Mp3 file.