mirror of
https://github.com/google/adk-docs.git
synced 2026-09-14 16:16:59 +08:00
3a95819297
* doc: Create configuration.md for live * foc: Update configuration.md * Update index.md --------- Co-authored-by: Lavi Nigam <98014943+lavinigam-gcp@users.noreply.github.com>
25 lines
763 B
Markdown
25 lines
763 B
Markdown
# Configurating streaming behaviour
|
|
|
|
There are some configurations you can set for live(streaming) agents.
|
|
|
|
It's set by [RunConfig](https://github.com/google/adk-python/blob/main/src/google/adk/agents/run_config.py). You should use RunConfig with your [Runner.run_live(...)](https://github.com/google/adk-python/blob/main/src/google/adk/runners.py).
|
|
|
|
For example, if you want to set voice config, you can leverage speech_config.
|
|
|
|
```python
|
|
voice_config = genai_types.VoiceConfig(
|
|
prebuilt_voice_config=genai_types.PrebuiltVoiceConfigDict(
|
|
voice_name='Aoede'
|
|
)
|
|
)
|
|
speech_config = genai_types.SpeechConfig(voice_config=voice_config)
|
|
run_config = RunConfig(speech_config=speech_config)
|
|
|
|
runner.run_live(
|
|
...,
|
|
run_config=run_config,
|
|
)
|
|
```
|
|
|
|
|