Clicking sound when audio playing Google AIY

I’m using the Respeaker 4-mic linear array with a raspberry pi, and the google assistant aiy code. everything technically seems to work ok. but for some reason, there is a clicking/static sound anytime I play any audio through the card via google assistant, when “she” speaks there is a audible clicking sound. I tried the card with audacity, and there is no distortion or clicking or any static, it’s perfectly clear, but using it with Google AIY the noise is there, any hints or tips as to what to look at would be appreciated :slight_smile:

I’ve still not found a solution for this, anyone have any ideas, as to what might be causing clicking on audio output?

@butteryak This could be due to Pulse or ALSA settings in pi.
Please check these links

You can also try this setting for alsa
options snd-hda-intel position_fix=1 power_save=0 power_save_controller=N

AFter some digging, I managed to fix this by adding period_time, period_size, buffer_size and setting format on my playback device.

pcm.dmixed {
type dmix
slave {
pcm “hw:seeed8micvoicec”
period_time 0
period_size 1024
buffer_size 8192
format S32_LE
ipc_key 555555

that seems to have fixed it. not sure if it’s 100% correct, but audio is clear as a bell now+++

tnx++ for point in the direction I needed to look