USB speaker don't work with Genie

Hi guys!

I’m new at Home Assistant and want replace my Alexa with it. So I bought an ODROID N2+ and Sandberg USB Speakerphone Pro (Sandberg USB Speakerphone Pro (126-17)), configed all and installed Ada and Genie.

When I click on the mic in the right corner on the dashboard, Genie saying any time “Home Assistant didn’t hear anything”. On the config pages at audio I selected “USB Audio Analogue Stereo”, but I also get no TTS when I typed in a text.

Here the audio config:

[core-ssh ~]$ ha audio info
audio:
  application:
  - addon: ""
    index: 0
    mute: false
    name: Echo-Cancel Sink Stream
    stream_index: 1
    stream_type: output
    volume: 1
  - addon: ""
    index: 0
    mute: false
    name: Echo-Cancel Source Stream
    stream_index: 1
    stream_type: input
    volume: 1
  - addon: 88544b92092430bc5d3fbbffc12a2f04
    index: 6
    mute: false
    name: Genie
    stream_index: 3
    stream_type: input
    volume: 1
  card:
  - driver: module-alsa-card.c
    index: 0
    name: alsa_card.usb-Generic_USB_Audio_201405280001-00
    profiles:
    - active: false
      description: Analog Stereo Input
      name: input:analog-stereo
    - active: false
      description: Digital Stereo (IEC958) Input
      name: input:iec958-stereo
    - active: false
      description: Analog Stereo Output
      name: output:analog-stereo
    - active: true
      description: Analog Stereo Duplex
      name: output:analog-stereo+input:analog-stereo
    - active: false
      description: Analog Stereo Output + Digital Stereo (IEC958) Input
      name: output:analog-stereo+input:iec958-stereo
    - active: false
      description: Digital Stereo (IEC958) Output
      name: output:iec958-stereo
    - active: false
      description: Digital Stereo (IEC958) Output + Analog Stereo Input
      name: output:iec958-stereo+input:analog-stereo
    - active: false
      description: Digital Stereo Duplex (IEC958)
      name: output:iec958-stereo+input:iec958-stereo
    - active: false
      description: "Off"
      name: "off"
  - driver: module-alsa-card.c
    index: 1
    name: alsa_card.platform-sound
    profiles:
    - active: true
      description: Analog Stereo Output
      name: output:analog-stereo
    - active: false
      description: Digital Stereo (HDMI) Output
      name: output:hdmi-stereo
    - active: false
      description: Digital Surround 5.1 (HDMI) Output
      name: output:hdmi-surround
    - active: false
      description: Digital Surround 7.1 (HDMI) Output
      name: output:hdmi-surround71
    - active: false
      description: "Off"
      name: "off"
  input:
  - applications:
    - addon: ""
      index: 0
      mute: false
      name: Echo-Cancel Source Stream
      stream_index: 1
      stream_type: input
      volume: 1
    card: 0
    default: true
    description: USB Audio Analog Stereo
    index: 1
    mute: false
    name: alsa_input.usb-Generic_USB_Audio_201405280001-00.analog-stereo
    volume: 0.2764892578125
  - applications:
    - addon: 88544b92092430bc5d3fbbffc12a2f04
      index: 6
      mute: false
      name: Genie
      stream_index: 3
      stream_type: input
      volume: 1
    card: null
    default: false
    description: USB Audio Analog Stereo (echo cancelled with Built-in Audio Analog
      Stereo)
    index: 3
    mute: false
    name: echosrc
    volume: 0.2764892578125
  output:
  - applications: []
    card: 0
    default: false
    description: USB Audio Analog Stereo
    index: 0
    mute: false
    name: alsa_output.usb-Generic_USB_Audio_201405280001-00.analog-stereo
    volume: 0.1999969482421875
  - applications:
    - addon: ""
      index: 0
      mute: false
      name: Echo-Cancel Sink Stream
      stream_index: 1
      stream_type: output
      volume: 1
    card: 1
    default: true
    description: Built-in Audio Analog Stereo
    index: 1
    mute: false
    name: alsa_output.platform-sound.analog-stereo
    volume: 0.1999969482421875
  - applications: []
    card: null
    default: false
    description: Built-in Audio Analog Stereo (echo cancelled with USB Audio Analog
      Stereo)
    index: 2
    mute: false
    name: echosink
    volume: 0.1999969482421875
host: 172.30.32.4
update_available: false
version: 2022.05.0
version_latest: 2022.05.0

Some Ideas?

Edit #2:
Bildschirmfoto vom 2022-05-22 17-51-10
???

Edit #3:

genie::state::State-Message: 18:18:35.338: ENTER state Listening
genie::AudioInput-Message: 18:18:35.338: [AudioInput] -> State::WOKE
genie::state::Listening-Message: 18:18:35.342: Stopping audio player...
genie::state::Listening-Message: 18:18:35.342: Playing WAKE sound...
** Message: 18:18:35.343: Queueing file:///usr/local/lib/genie-client/assets/match.oga for playback
genie::state::Listening-Message: 18:18:35.344: Connecting STT...
genie::state::State-Message: 18:18:35.344: Received PlayerStreamEnter with type=1 ref_id=-1, ignoring.
genie::state::State-Message: 18:18:35.348: Received PlayerStreamEnter with type=1 ref_id=-1, ignoring.
genie::state::State-Message: 18:18:35.349: Received PlayerStreamEnter with type=1 ref_id=-1, ignoring.
genie::state::State-Message: 18:18:35.353: Received PlayerStreamEnter with type=1 ref_id=-1, ignoring.
** Message: 18:18:36.417: End of stream
genie::state::State-Message: 18:18:36.422: Received PlayerStreamEnd with type=1 ref_id=-1, ignoring.
genie::AudioInput-Message: 18:18:37.432: [AudioInput] -> State::LISTENING
genie::conversation::Client-Message: 18:18:38.188: Sending: {"type":"ping"}
genie::AudioInput-Message: 18:18:38.196: [AudioInput] -> State::WAITING
genie::state::Listening-Message: 18:18:38.196: Handling InputDone...
** Message: 18:18:38.196: Queueing file:///usr/local/lib/genie-client/assets/match.oga for playback
** Message: 18:18:38.197: TRANSIT to Processing
genie::state::State-Message: 18:18:38.197: Spent 2859 milliseconds in state Listening
genie::state::State-Message: 18:18:38.197: ENTER state Processing
genie::state::State-Message: 18:18:38.198: Received PlayerStreamEnter with type=1 ref_id=-1, ignoring.
genie::state::State-Message: 18:18:38.200: Received PlayerStreamEnter with type=1 ref_id=-1, ignoring.
genie::state::State-Message: 18:18:38.202: Received PlayerStreamEnter with type=1 ref_id=-1, ignoring.
genie::state::State-Message: 18:18:38.205: Received PlayerStreamEnter with type=1 ref_id=-1, ignoring.
[18:18:38.744128] on_message (../src/stt.cpp:262): STT text: Hey Jeannie.What's the weather?
genie::STT-Message: 18:18:38.744: Mangled: What's the weather?
genie::conversation::Client-Message: 18:18:38.748: Sending: {"type":"command","text":"What's the weather?"}
genie::conversation::Client-Message: 18:18:38.752: Received message: {"type":"command","command":"What's the weather?","id":8}
Saving conversation state for main (107 characters)
Received assistant command What's the weather?
Initializing dialogue policy for devices: org.thingpedia.weather
Batched dataset request for org.thingpedia.weather
Loaded 1 devices
Loaded 22 templates
GPS location not available
Genie says: Sorry, I cannot find any location matching “What's the weather?”.
genie::conversation::Client-Message: 18:18:42.921: Received message: {"type":"text","text":"Sorry, I cannot find any location matching ?What's the weather??.","icon":null,"id":9}
genie::state::Processing-Message: 18:18:42.922: Received TextMessage, responding with text: Sorry, I cannot find any location matching ?What's the weather??.
** Message: 18:18:42.922: TRANSIT to Saying
genie::state::State-Message: 18:18:42.922: Spent 4724 milliseconds in state Processing
genie::state::State-Message: 18:18:42.922: ENTER state Saying
Saving conversation state for main (107 characters)
genie::conversation::Client-Message: 18:18:42.931: Received message: {"type":"askSpecial","ask":null,"context":{"code":["null"],"entities":{}}}
genie::state::Saying-Message: 18:18:42.931: Received empty AskSpecialMessage, round done.
** Message: 18:18:48.042: End of stream
** Message: 18:18:48.045: TRANSIT to Sleeping
genie::state::State-Message: 18:18:48.045: Spent 5123 milliseconds in state Saying
############# Processing Performance #################
genie::state::State-Message: 18:18:48.045: ENTER state Sleeping
         STT:  546.745 ms ( 11%)
  STT->Genie:    3.643 ms (  0%)
       Genie: 4173.987 ms ( 88%)
  Genie->TTS:    0.186 ms (  0%)
         TTS:    0.641 ms (  0%)
------------------------------------------------------
       Total: 4725.000 ms (100%)
######################################################

Okay Genie is listening but there is no audio.

Edit #4:

As expected: Genie don’t want to play audio. BUT I tried VLC and the audio is working fine here! So it has to be an issue here.

Can be closed. Bought another mic because this one is crap.

Hello Johnnii360,

just curious, which microphone did you buy at the end?

Best regards and thanks
Andreas

Hi Andreas!

I bought the SPC Gear SM950T Streaming Microphone and hope this is much better than this Sandberg thing. The Sandberg shall cover an area of 3 meters but Genie doesn’t understand my at 3 m. It’s also an issue at a nearer distance. I think the mic’s in the Sandberg are not sensitive enough. I hope that the SPC is. It was on a promotion sale yesterday on Alternate.de for 39,99 EUR instead of 69,90 EUR. :slight_smile:

Thanks for your reply, Johnnii, appreciated!

Would be great if you could share your results.

I’m currently doing some tests with this one here which is supposed to have certain noise cancelling algorithms included:
https://www.minidsp.com/products/usb-audio-interface/uma-8-microphone-array

In a first test it seems quite good (also from some distance), but I’m yet to test with background noise.

Best regards
Andreas

Your welcome!

Sure I will report the results next week(end) here. :slight_smile:

Looks interesting, your Mic Array! It look like you tinker a kind of Amazon Echo Dot, right? I also had a similar idea, to make a own smart speaker but I paused that idea for now. I use as speakers now these Ultron Mini Cubes 2.0 (https://www.testbericht.de/produkte/ultron-66537-mini-cubes-20). It is USB powered but connected via audio jack.

Best greetings!

My plan is to integrate speech recognition into a multi-room audio system:
So the output will go through speakers in the ceiling, just the input/microphone is missing. :wink:

As I will need quite a few of these “microphone clients” at the end, I will probably leave the actual processing (ASR, NLP, …) to a central server. This way the microphone client does not need to do much more than recognizing the hot word and thereafter sending an audio stream to the server for further processing (using a simple PoE powered Raspberry Pi Zero 2 with mentioned microphone PCB for that).

1 Like

Hi Andreas!

Today the SPC Gear SM950T has arrived. Works way much better than the Sandberg crap.

At first test I thought it’s worse than the Sandberg but I forgot to turn up the volume. :smiley:

It’s really ridiculous I have to use such a fancy streaming microphone. But when it works it works. :slight_smile: I think it’s very important that you have such a sensitive mic or mic array like the Amazon Echos.

Hello Johnnii,

as I would like to place the microphones a bit more inconspicuously, I was testing with mentioned microphone array PCB indeed (which can then be easily integrated in some sort of mountable box).

You just place the microphone on a desk?

Best regards
Andreas

Yepp, I placed the microphone on my desk.

How have you got your multiroom audio setup, I’ve read so many but they all seem either messy and imperfect or sonos (expensive as fuck). Do you mind sharing where you went with?

Hello,

sure, I have a working client prototype with keyword recognition using a PoE-powered Raspberry Pi Zero 2 and a ReSpeaker Mic Array v2.0 as microphone array which also includes 12 LEDs that are nice for visual feedback. Two photos of my prototype with 3D printed case:


On the Raspberry only keyword detection is done and after keyword is detected an audio stream is sent to a server which does all further processing.

For the server-side I did try a few processing tool chains (ASR/NLP), but I’m not fully happy with the results yet.

To be honest I simply decided to wait some more months before going further (especially with the back-end side) at the moment as Home Assistant announced that they would bring a lot of stuff in regards to voice control this year with also the guy behind Rhasspy working for the Home Assistant team now as I understood. So I do expect a lot of movement in this regard over the next couple of months.

Maybe we don’t need to re-invent the wheel ourselves anymore then.
So essentially I’m a bit in standby mode now and carefully reading all new Home Assistant release notes. :wink:

Best regards
Andreas

1 Like

Thank you, this is super informative! That mic array looks perfect. I agree about waiting to see the HA voice implimentation, so I thought I’d look at the hardware side. I’m going to order one of these. Do you use a bunch of Pi Zero 2s with the HifiBerry around your house for all the different speakers then?

Yeah, exactly, that’s the plan:
I have a ceiling mounting prepared (you see the little magnets at the top), still testing the best mounting options though.

The output of the HiFiBerry DAC+ Zero feeds then into a 2x30 Watt amplifier for 8 Ohm speakers (like most professional ceiling speakers are) which is powered by a 24 V power supply. As I have a suspended ceiling I can fit these devices in there without problems.

Just a CAT-7 (for network/PoE) and standard power supply cable is needed coming from the basement. The power supply itself will be behind a KNX switch actuator, so the amplifier can be turned fully off while there is no sound output. And the Raspberry is still powered separately by PoE for active speech recognition, although I would consider also turning the Raspberry PoE power off (possible with proper PoE switches that support an API) while nobody is in the room based on KNX presence detection.

1 Like

Ah, yes thisis the kind of thing I’m looking for. I never thought about using my presence detection to turn on or off the poe. Great plan.