Using anker speakerphone as mic and speaker

Hello,
I connected anker speaker phone to my rpi 3b+ to use it with rhasspy.
when using it I had 2 problems:

  1. not hearing the beep after triggering the wakeword (porcupine)
  2. first 2 words of the tts sentence where cut

I deed a test and used anker for the input via usb and a separate speaker for the output via aux.

In this setup all works fine:, wakeword --> beep --> stt --> … --> full tts without any cuts.

In rhasspy i use arecord and aplay.

So I guess the aplay via anker is causing the problem.

Any idea how can i solve this?

I purchased this product because I wanted a nice looking compact solution to hang on the wall. It misses the point if I will have to had a speaker as well.

BTW, mics are amazing! I can trigger wakeword with background music from my TV!

Error 508: need more info. :rofl:

How did you connect it to RPi?
What aplay -lshows?
Are you able to play sounds without issue with aplay?

If you seek help, it is always good to provide as much information you can.

Its a strange one as it cuts first second or so.

aplay /usr/share/sounds/alsa/Front_Center.wav you will hear ‘center’ every time you aplay one after another.
On Amd_X86 Ubuntu aplay /usr/share/sounds/alsa/Front_Center.wav will cut first time then it keeps alive and after you will hear ‘front center’ every time.
Ubuntu on Pi same as raspbian

Installed pulseaudio and its the same but long gaps it will cut again.

So install sox and ran sox -n which is null (silence) and that keeps it alive
paplay /usr/share/sounds/alsa/Front_Center.wav you will hear ‘front center’ every time no matter how long the gap.

So guess something like /etc/asound.conf for alsa

pcm.dmixed {
    type dmix
    ipc_key 1024
    ipc_key_add_uid 0
    slave.pcm "hw:0,0"
}
pcm.dsnooped {
    type dsnoop
    ipc_key 1025
    slave.pcm "hw:0,0"
}

pcm.duplex {
    type asym
    playback.pcm "dmixed"
    capture.pcm "dsnooped"
}

# Instruct ALSA to use pcm.duplex as the default device
pcm.!default {
    type plug
    slave.pcm "duplex"
}
ctl.!default {
    type hw
    card 0
}

And the above sox play -n running in the background.

My hdmi2hdmi+audio does the same and never noticed the cut before on raspbian but couple of other usb soundcards play ok.

I can fudge it with sox but not sure how to keep alive snd_usb
Windows it just works?!?