question

HanZifei-1409 avatar image
0 Votes"
HanZifei-1409 asked HanZifei-1409 edited

"1002 + 405" Error in Windows VoiceAsssistantClient

For the bot samples provided, I made a success for the sample 2 echo-bot following the tutorial (https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/tutorial-voice-enable-your-bot-speech-sdk), but encountered some trouble when turning to 49 qnamaker-all-features. I took the similar steps with the tutorial while additionally filling the appsettings.json with information of a knowledge base I built. But when I ran the bot in VoiceAssistantClient, the returned error is:

Error (ConnectionFailure) : Connection was closed by the remote host. Error code: 1002. Error details: The server returned status code '405' when status code '101' was expected. SessionId: 70fa68f0050240299fdc89844992ddb1

I have changed subscription keys, changed passwords, and even conducted the whole tutorial again, but these methods don't work. Besides, there seems to be no troubleshooting doc that includes this error. Does this "1002+405" error mean that the speech service cannot be applied to this sample of qnamaker or some other problems? How to resolve it? Thanks.

azure-webappsazure-speechazure-qna-maker
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

romungi-MSFT avatar image
0 Votes"
romungi-MSFT answered romungi-MSFT commented

@HanZifei-1409 I found an old issue in the closed issues page of voice assistant client with the same error.
Basically, it looks like UseWebSockets() needs to be added for the Configure and [HttpGet] to PostAsync for sample 63 as mentioned by the user. I think a similar config change can be done in sample 49 too and the changes might need to go here for HTTPGet and add app.UseWebSockets in startup.cs.

Hope this helps.


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, thank you very much for your guidance. Now I can successfully connect my bot in VoiceAssistantClient, but a new problem is that the client cannot reply my questions in speech neither when I type in the message-sending bar nor when I speak to it (the answers are correct but only shown in the interface). Testing again, I found that the client does not even read out "Hello and welcome" as before. Should I further add some lines of code to make it work again?
(Besides, my knowledge base for this test is not written in English, but I have given the right language in the settings. I don't know if this may be the cause.)

0 Votes 0 ·

@HanZifei-1409 Since you are unable to use speech, Is the direct line speech channel attached to the bot? I think you followed these steps to attach the channel for the echo bot.
If it is already added then I think we would have to debug or compare the two bot solutions to understand what could be the missing link.


0 Votes 0 ·

@romungi-MSFT I checked my bot just now and I'm sure that my bot is connected to the channel of "Direct line speech", with the "health" condition being "running". I have tried to delete the old channel and then connect again, but it won't work.
Nevertheless, I think checking the code of these two sample bots could be helpful and I will take a try now. I would be grateful if you can give more suggestions about this.

0 Votes 0 ·