Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio clipping #43

Open
Fleker opened this issue Sep 21, 2017 · 12 comments
Open

Audio clipping #43

Fleker opened this issue Sep 21, 2017 · 12 comments
Labels

Comments

@Fleker
Copy link
Collaborator

Fleker commented Sep 21, 2017

(Conversation carried on from #23)

@mhanuel26 you can check out this StackOverflow answer to play simple sounds on a device

@proppy
Copy link
Collaborator

proppy commented Oct 18, 2017

@mhanuel26 can you confirm which hardware you were using?

@proppy proppy added the bug label Oct 18, 2017
@plattysoft
Copy link

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.

@plattysoft
Copy link

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.

@mhanuel26
Copy link

@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

@Fleker
Copy link
Collaborator Author

Fleker commented Nov 10, 2017

Can you disable the LED blinking on receiving audio samples and see if that resolves your issue?

@ronjdaugherty34
Copy link

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,

@Fleker
Copy link
Collaborator Author

Fleker commented Nov 10, 2017

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.

@plattysoft
Copy link

Thanks! I'l try it and let you know, but it sounds likely that the LED is the cause.

@plattysoft
Copy link

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.

@Fleker
Copy link
Collaborator Author

Fleker commented Nov 12, 2017

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.

@plattysoft
Copy link

I actually sent a PR just now for another blinking solution :) Will check staging branch. Thanks

@Fleker
Copy link
Collaborator Author

Fleker commented Nov 13, 2017

There's a branch we have internally for changes. But we'll take a look at your PR.

@proppy proppy mentioned this issue Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants