dialogflow / dialogflow-cordova-client

Cordova library for Dialogflow
Apache License 2.0
42 stars 23 forks source link

Speech Recognition Engine - No recognition result matched #11

Closed kshitizshankar closed 8 years ago

kshitizshankar commented 8 years ago

Hi, I am trying to play around with cordova API.ai SDK but I am having issues in setting it up. I have a very random behavior where I get "{\"message\":\"Speech recognition engine error: No recognition result matched.\"}" most of the times.

I have attached my relevant code below as well. It is just a basic call to the API SDK.

$scope.sendVoice = function(){
try {
  ApiAIPlugin.requestVoice(
    {}, // empty for simple requests, some optional parameters can be here
    function (response) {
        // place your result processing here
        console.log(JSON.stringify(response);
    },
    function (error) {
        // place your error processing here
        console.log(JSON.stringify(error));

    });                
} catch (e) {
    alert(e);
}
}

Here is the code for my button -

    <button class="button" ng-click="sendVoice()">

I am getting the same error when I try to use the cordova sample as well. It was working fine on the day I installed the app on my Samsung S4 but it stopped working after a few hours and I have been getting the same error every since. I tried to debug the issue but haven't been able to figure it out so far. Every time the button is clicked, the error callback gets executed.

If I click the button again immediately, it works for the next request. (So yeah, not sure what is going on here).

xVir commented 8 years ago

Hi, @kshitizshankar ! We will publish the new version of SDK in few days, in new version problem should be solved.

kshitizshankar commented 8 years ago

@xVir Oh ok, so this is a SDK problem? I wasn't sure whether something was messed up at my end. Any strict timeline on when the new SDK would be available?

xVir commented 8 years ago

@kshitizshankar it can be the SDK problem... If new SDK will not solve the problem I will make a test app to check your problem. New SDK we plan to release this week.

kshitizshankar commented 8 years ago

@xVir Sure, thanks!

xVir commented 8 years ago

Hi, @kshitizshankar , Please try to install this test app https://www.dropbox.com/s/w4zlsjhrqw7551c/android-debug.apk?dl=0 And check if the problem still exists. (Use Voice Request option) Also, please attach the android log here. Thanks!