8000 Update google_generative_ai_conversation.markdown to document support… · home-assistant/home-assistant.io@7606a04 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7606a04

Browse files
tl-sllanthaler
authored andcommitted
Update google_generative_ai_conversation.markdown to document support for Gemini's new TTS capabilities
1 parent f9ad47b commit 7606a04

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

source/_integrations/google_generative_ai_conversation.markdown

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Google Generative AI
33
description: Instructions on how to integrate Google Generative AI as a conversation agent
44
ha_category:
55
- Voice
6+
- Text-to-speech
67
ha_release: 2023.6
78
ha_iot_class: Cloud Polling
89
ha_config_flow: true
@@ -14,6 +15,7 @@ ha_integration_type: service
1415
ha_platforms:
1516
- conversation
1617
- diagnostics
18+
- tts
1719
related:
1820
- docs: /voice_control/voice_remote_expose_devices/
1921
title: Exposing entities to Assist
2527
title: Google Generative AI
2628
---
2729

28-
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.
30+
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.
2931

3032
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.
3133

@@ -188,6 +190,32 @@ response_variable: generated_content
188190

189191
{% endraw %}
190192

193+
### Action `tts.speak`
194+
195+
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.
196+
197+
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!".
198+
199+
For more options about `speak`, see the Speak section on the main [TTS](/integrations/tts/#service-speak) building block page.
200+
201+
In YAML, your action will look like this:
202+
203+
{% raw %}
204+
205+
```yaml
206+
action: tts.speak
207+
target:
208+
entity_id: tts.google_generative_ai_tts
209+
data:
210+
media_player_entity_id: media_player.tv
211+
message: Say cheerfully: Have a wonderful day!
212+
options:
213+
voice: <voice-id>
214+
model: <model-id>
215+
```
216+
217+
{% endraw %}
218+
191219
## Video tutorial
192220

193221
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.
@@ -204,4 +232,4 @@ logger:
204232
homeassistant.components.conversation: debug
205233
homeassistant.components.conversation.chat_log: debug
206234
homeassistant.components.google_generative_ai_conversation: debug
207-
```
235+
```

0 commit comments

Comments
 (0)
0