ehzhang/dispatch

Cordova native speech to text functionality

Opened this issue · 2 comments

Hey Edwin!

I was one of the students who attended the Meteor 2015 hackathon where you presented Dispatch (I was from team pluto, if that still means anything).

If I remember correctly, you mentioned during your presentation that you were able to somehow access the native speech to text functionality on an iOS device (if I'm not mistaken you were using an iPad during the presentation). I'm curious to know, how were you able to achieve this? From what I've read, Cordova isn't able to access siri on iOS, and as such I have been relying on an external api (e.g google speech) to carry out speech recognition.

I've been trying to get rid of the google speech dependency but have yet to find a good alternative. Native speech recognition sounds promising, but I took a look through your code and can't seem to locate where you implemented the feature. Do you think you could give me some pointers regarding this? Any help would be greatly appreciated.

Thanks!

It's actually very simple, and I'm usually surprised when people try anything else.

Simply have a text input, and instead of typing text, use voice dictation. That way, you can type text and/or use voice, and the naive iOS dictation is by far the best anyway :)

Oh I see. That's a really interesting approach, although now I can see why I didn't look into that option before. For one, I never knew about this feature because I just realized I had dictation disabled in settings (I must have disallowed microphone access during setup or something). Also, it seems like this method requires the text input to be visible for the user to be able to access dictation. With Pluto being an app that requires dictation without any option for typing, the text input field is not so ideal. I suppose I could mask the text input and somehow delegate clicks to the dictation key, but even that seems to be troublesome since the dictation key isn't standard as far as I know. All said, I do agree that it works really well for apps like Dispatch where dictation is just an opt-in feature. I'll try to see if I can find a way to use this as a workaround to google speech. Thanks for the help!