Is possible to use a Google mini speaker as microphone and speaker for assist?

How can I configure HA to use a Google mini speaker as a microphone to speak with assist and a speaker to hear the answers? I know I can define the media player for tts.speak, but I am not sure how to capture all the assist agent messages…

Hi,

Google hardware is closed and secure so can only do what it was designed for.

The same security designed to keep your conversations private (Google only) means no one else (including HA) can access the microphones. If it were easy for any software to access the mics, there would have been a justified outcry. The hardware is also likely limited so modern wake-word detection would be too hard.

Replacement hardware is possible though - Onju Voice:

If this helps, :heart: this post!

1 Like

So, I can’t. But what about the use of the Google mini as speaker for assist? I can write a prompt, store the response, and send it to Google mini speaker by TTS when I do it on an automation or script , using google_generative_ai_conversation.generate_content action…
But I am not sure how to capture the text generated by the assist when the prompt is write directly on assist dialog screen…

You can send TTS output to any ChromeCast device:

action: tts.google_say
data:
  entity_id: media_player.chromecastaudio1234
  message: This is a test message.
  cache: true

Assist audio? No idea.

Thanks for the answer. I think I can still use it as speaker, in fact, I can send the assist responses to

Yes. I do:

- action: google_generative_ai_conversation.generate_content
    data:
      prompt: >-
        What time is it?
    response_variable:generated_text
  - action: tts.speak
    target:
      entity_id: tts.piper
    data:
      cache: true
      media_player_entity_id: media_player.google_mini
      message: "{{generated_text.text}}"
    enabled: false
  - action: tts.speak
    target:
      entity_id: tts.google_translate_es_es
    data:
      cache: true
      media_player_entity_id: media_player.google_mini
      message: "{{generated_text.text}}"

This code generate a response from the AI, using google_generative_ai_conversation.generate_content and store it in a variable. Then send the variable to tts and then to the google mini speaker. But I am not sure how to do the same for all text generated with prompt in the AI dialog window.

1 Like