androidthings / sample-googleassistant

Google Assistant API sample for Android Things
Apache License 2.0
467 stars 147 forks source link

No error: A GRPC status of OK should have been sent Rst Stream #58

Closed navasmdc closed 6 years ago

navasmdc commented 6 years ago

After configure the project I have launched the application and say my first command "Hello", the assistant returns No error: A GRPC status of OK should have been sent Rst Stream. I've checked Google APIs Console and I saw that the error is google.assistant.embedded.v1alpha2.EmbeddedAssistant.Assist Code 499

What is the problem? Because with the previous version of the API, it works.

Fleker commented 6 years ago

Can you check the connectivity of your device? It may be related to having a stable Wi-Fi connection. I'm looking into it.

navasmdc commented 6 years ago

Hi, I've updated the proto version to 1.9.0 and now the logcat doesn't display these error, but if I check the Google APIS console, it says the same, error 499. I've tried with 3G connection, connecting the raspberry to my smartphone and the same is happening.

What can I do?

navasmdc commented 6 years ago

Finally I found the error, the API was working fine although the console says error 499, the problem was that the code didn't have enabled the voice hat speaker and for these reason I couldn't hear the Google Assistant response.

I'm going to close the issue, but the code's owner should enable the speaker with this line


         if (USE_VOICEHAT_I2S_DAC) {
                Log.i(TAG, "initializing DAC trigger");
                mDac = VoiceHat.openDac();
                mDac.setSdMode(Max98357A.SD_MODE_LEFT);

                mButton = VoiceHat.openButton();
                mLed = VoiceHat.openLed();
            }