dialogflow / dialogflow-apple-client

iOS SDK for Dialogflow
http://api.ai
Apache License 2.0
244 stars 65 forks source link

Speech Recognition Error #11

Closed awaiss4 closed 8 years ago

awaiss4 commented 8 years ago

I have downloaded sdk for ios and import the ApiAiDemoSwift workspace into the xcode. I received this error "Error Domain=voice.detection.error Code=1 "(null)"" when i run Voice Button Request. Other two modules named as "Simple Voice Request" and "Text Request" are working fine.

kshitizshankar commented 8 years ago

Facing the exact same error.. any update on this? What am I missing in the setup? (I am integrating it in my app.. not the demo app)

sstepashka commented 8 years ago

Hi everyone,

This error mean, that VAD (Voice Activity Detection) cannot determinate voice in sound stream.

kshitizshankar commented 8 years ago

So how to fix it? I just have a basic setup with API.AI.. Followed all the instructions on integrating it inside my app on iOS..

kshitizshankar commented 8 years ago

Ahh ok.. I was trying to run it in the simulator.. Works on the device.. Is that the correct behaviour or am I still missing something?

sstepashka commented 8 years ago

We use some algorithm for detecting end of speech in audio stream. This algorithm have some error rate for detecting end-of-speech, I will try to improve it in future.

thakurdDev commented 8 years ago

You just need to set below settings for audio : AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:(AVAudioSessionCategoryOptionAllowBluetooth | AVAudioSessionCategoryOptionDefaultToSpeaker) error:nil]; [session setActive:YES withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil]; And it will work . in my case everything is working.

thakurdDev commented 8 years ago

Sometimes i got below error : can anyone getting same or found any solution for that ? status = { code = 403; errorDetails = "Api.ai speech recognition is included with all of our paid plans."; errorType = forbidden; };

qadirsuh commented 8 years ago

@thakurdDev I am also getting this. with Voice Button Request , but Text Request is working perfect and is executing my desired Intent with action I have defined in my Api.ai dashboard.

status = {
code = 403;
errorDetails = "Api.ai speech recognition is included with all of our paid plans.";
errorType = forbidden;
};

Above response means you have to upgrade your Api.ai account with a paid plans.

Note: I am testing with ios app (Swift) app.

sstepashka commented 8 years ago

@thakurdDev @qadirsuh Please read pricing: https://api.ai/pricing/

Free plan doesn't contain voice recognition, and now, it's really disabled for free plans.

Please, just read error text, why you couldn't do it?

thakurdDev commented 8 years ago

Thanks for information.

But i want to confirm: Is it with new account as well ? Because i have worked with voice request more then 20 days (3500 voice request.) with my first account. And then it is stopped. that's why i want to confirm is it any new updation inside api.ai or for all my new account the rule will work. Sorry for this stupid question :)

User2004 commented 5 years ago

Implement Speech to text convert (Speech recognition) in swift 3.0 or later. view code Click here