Open Fleker opened 7 years ago
@mhanuel26 can you confirm which hardware you were using?
I do have quite a horrible audio when using this project, not sure if it is a hardware or a software problem.
I am using the AIY kit with a Raspberry PI 3 running Android Things 5.1
The audio gets choppy almost every time, I tried doubling the buffer size but didn't seem to make a difference.
Some more info here: I tried the AIY image and run the test sound. The speaker worked fine.
It looks like a bug on the VoiceHAT driver of the speaker.
Let me know if there is something I can test to help with this.
@proppy Sorry for my late response, I am using the AIY google kit with raspberry pi3 and android things preview 5.1, similar to @plattysoft
Can you disable the LED blinking on receiving audio samples and see if that resolves your issue?
I was having the same problem with audio clipping too. I resolved it by removing the code in the ConversationCallback method section public void onAudioSample(). During the response from the assistant, it's constantly toggling the LED on and off which was slowing down the speech,
I have also seen the behavior. Removing the code at https://github.com/androidthings/sample-googleassistant/blob/master/app/src/main/java/com/example/androidthings/assistant/AssistantActivity.java#L162 resolved it.
Perhaps it's a threading issue. I've made the change at some point in the staging repo.
Thanks! I'l try it and let you know, but it sounds likely that the LED is the cause.
Indeed it worked! I'm thinking on writing a fix for this that makes the led blink but in another way, if i do it I'll send a PR. In the meantime I suggest disabling the blinking. A lot of this kits started shipping past week and it will be very annoying if people keeps finding this issue.
There is the change in staging, but it has not been pushed yet. Though the issue seems to be handled, this issue will remain open until the changes are public.
I actually sent a PR just now for another blinking solution :) Will check staging branch. Thanks
There's a branch we have internally for changes. But we'll take a look at your PR.
(Conversation carried on from #23)
@mhanuel26 you can check out this StackOverflow answer to play simple sounds on a device