10000 Update google_generative_ai_conversation.markdown to document support for Gemini's new TTS capabilities by lanthaler · Pull Request #39340 · home-assistant/home-assistant.io · GitHub
[go: up one dir, main page]

Skip to content

Update google_generative_ai_conversation.markdown to document support for Gemini's new TTS capabilities #39340

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

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension All 1 file type selected

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions source/_integrations/google_generative_ai_conversation.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Google Generative AI
description: Instructions on how to integrate Google Generative AI as a conversation agent
ha_category:
- Voice
- Text-to-speech
ha_release: 2023.6
ha_iot_class: Cloud Polling
ha_config_flow: true
Expand All @@ -14,6 +15,7 @@ ha_integration_type: service
ha_platforms:
- conversation
- diagnostics
- tts
related:
- docs: /voice_control/voice_remote_expose_devices/
title: Exposing entities to Assist
Expand All @@ -25,7 +27,7 @@ related:
title: Google Generative AI
---

The Google Generative AI integration adds a conversation agent powered by [Google Generative AI](https://ai.google.dev/) in Home Assistant. It can optionally be allowed to control Home Assistant.
The Google Generative AI integration adds a conversation agent and text-to-speech engine powered by [Google Generative AI](https://ai.google.dev/) to Home Assistant. It can optionally be allowed to control Home Assistant.

Controlling Home Assistant is done by providing the AI access to the Assist API of Home Assistant. You can control what devices and entities it can access from the {% my voice_assistants title="exposed entities page" %}. The AI is able to provide you information about your devices and control them.

Expand Down Expand Up @@ -188,6 +190,32 @@ response_variable: generated_content

{% endraw %}

### Speak

The `tts.speak` action is the modern way to use TTS. Add the `speak` action, select the Google Generative AI TTS entity, select the media player entity or group to send the TTS audio to, and enter the message to speak.

Text-to-speech (TTS) generation is controllable, meaning you can use natural language to structure interactions and guide the style, accent, pace, and tone of the audio. You can change the way the text is spoken directly in the message by, e.g. entering "Say cheerfully: Have a wonderful day" instead of just "Have a wonderful day".

For more options about `speak`, see the Speak section on the main [TTS](/integrations/tts/#service-speak) building block page.

In YAML, your action will look like this:

{% raw %}

```yaml
action: tts.speak
target:
entity_id: tts.google_generative_ai_tts
data:
media_player_entity_id: media_player.tv
message: Say cheerfully: Have a wonderful day!
options:
voice: <voice-id>
model: <model-id>
```

{% endraw %}

## Video tutorial

This video tutorial explains how Google Generative AI can be set up, how you can send an AI-generated message to your smart speaker when you arrive home, and how you can analyze an image taken from your doorbell camera as soon as someone rings the doorbell.
Expand All @@ -204,4 +232,4 @@ logger:
homeassistant.components.conversation: debug
homeassistant.components.conversation.chat_log: debug
homeassistant.components.google_generative_ai_conversation: debug
```
```
0