zzmp / juliusjs

A speech recognition library for the web
https://zzmp.github.io/juliusjs
Other
2.58k stars 175 forks source link

Demo doesn't work on Safari 7.1 #13

Open kingsfleet opened 10 years ago

kingsfleet commented 10 years ago

webAudioContext is there but not AudioContext, could the constructor code be replaced with this:

var AudioContext = window.AudioContext || window.webkitAudioContext; audio.contex = new AudioContext();

zzmp commented 10 years ago

@kingsfleet I just pushed a fix - great suggestion. Could you try it again and let me know if it is working for you?

kingsfleet commented 10 years ago

Odd still serving the old version. Is there something else that needs to be done?

On 9 Oct 2014, at 19:55, Zach Pomerantz notifications@github.com wrote:

@kingsfleet I just pushed a fix - great suggestion. Could you try it again and let me know if it is working for you?

— Reply to this email directly or view it on GitHub.

zzmp commented 10 years ago

Yes! It needs to be changed in the demo, which is on a separate branch.

Separately, a build process needs to be put in place to keep the two branches in sync.

zzmp commented 10 years ago

I'd be grateful if others could test this and make sure it works cross-system. I made a basic build script (run by Travis) that should avoid this issue in the future.

kingsfleet commented 10 years ago

Hi,

It then goes on to fail with safari as getUserMedia isn't supported:

http://caniuse.com/#feat=stream

Is there an AudioContext API you could use instead? It might make it also work on IE.

zzmp commented 10 years ago

I'm not sure of another API to capture microphone intput, besides getUserMedia. Do you know of a shim to work on Safari/IE?

I built this as a toy project, and use Chrome myself, so I hadn't considered compatibility to a large extent. @kingsfleet I would love if you could PR a shim for unsupported browsers.

kingsfleet commented 10 years ago

Apparently there is a webkitGetUserMedia, can you try that and I will see if the demo works? (Sorry for the delay in getting back to you.)

zzmp commented 10 years ago

I can try it later today when I have more time. For reference, this is where I usually check for compatibity, followed by mdn.

I'm sure there are Flash shims that polyfill the microphone input feature, but I haven't looked into them yet, aside from seeing that they exist. That might be the alternative that needs to be pursued in this case.