Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.86k stars 1.84k forks source link

Intent is not being recognized, appears as speech only #1504

Closed avv73 closed 2 years ago

avv73 commented 2 years ago

Describe the bug When doing intent recognition with LUIS, no intent is being recognized and all recognitions appear as speech only.

To Reproduce Steps to reproduce the behavior:

  1. Follow steps as given in https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-recognize-intents-from-speech-csharp. Copy the program that is shown in the Add the code section (I have it attached as a file to this issue).
  2. Replace YourLanguageUnderstandingSubscriptionKey, YourLanguageUnderstandingServiceRegion, YourLanguageUnderstandingAppId with the corresponding values.
  3. Run the program and say utterance that corresponds to some intent - no intent will be recognized, only speech will be.

Expected behavior Recognize the matching intent and show JSON from the recognition result.

Version of the Cognitive Services Speech SDK 1.21.0

Platform, Operating System, and Programming Language

Additional context I'm using a prediction resource in francecentral region, Also, I have trained & published the app with a single intent in it, as shown below:

image

I'm attaching the Speech SDK log from the program too.

SpeechSDK_log.txt

Program.txt

ralph-msft commented 2 years ago

Thanks for trying the Cognitive Services Speech SDK.

I don't see anything obviously off from the logs or in your code. I can see that you are saying "Good morning":

[23114]: 3010ms SPX_TRACE_VERBOSE:  recognition_result.cpp:104 CSpxRecognitionResult::InitFinalResult: resultId=9405620f62f74dcabb3050d27fa0301b reason=3, text='Good morning.'

But that should still match as an intent.

Have you tried using the "Test" functionality in the LUIS dashboard? You can type in some text e.g. Good morning, and you can see what intent it will match. If that doesn't work, there may be an issue with your intent recognition model

In addition, when you published your model, did you you a "Staging slot", or a "Production slot"? You'll need to use the production slot if you want to use the SDK.

avv73 commented 2 years ago

Thanks for taking your time to look into this issue, it's really bothering me.

Yes, 'Good morning' should hit the intent, at least when I tried it using the "Test" functionality from the LUIS dashboard (which works normally for the model by the way).

I'm publishing the model in both slots, regardless, the result is still the same.

Is it possible that there is a region-specific issue here? When I try the same code using another LUIS application in a different region, it works normally.

chschrae commented 2 years ago

Hi @avv73,

What region is your key and LUIS app in that isn't working? Are both the key and LUIS in francecentral?

avv73 commented 2 years ago

Hey @chschrae, the prediction resource is in francecentral, authoring resource (if that's what you mean by LUIS app region) is in westeurope.

chschrae commented 2 years ago

Hi @avv73 After speaking with the service team, we have found a problem specific to francecentral. A fix is ready and should be available by wednesday. I will leave this issue open and follow up once I can verify it has been fixed.

chschrae commented 2 years ago

Hi @avv73 ,

Today I was able to create an app from westeurope and have a francecentral prediction resource. Then I observed the intent recognizer working properly. Can you confirm yours is working?

avv73 commented 2 years ago

Hi @chschrae , everything is working fine with the francecentral prediction resource now, I'm unable to reproduce the issue. Thanks for fixing the bug!