Issue changing default voice in Gemini2 live api #378
Labels
component:examples
Issues/PR referencing examples folder
status:triaged
Issue/PR triaged to the corresponding sub-team
type:bug
Something isn't working
Description of the bug:
I'm using the code in live_api_starter.py to test out the multimodal live api and build from there. The basic code works. Based on the documentation in https://ai.google.dev/api/multimodal-live#sessions I am attempting to change the default voice but it seems to be not working if I use the format mentioned in the API documentation:
My code snippet:
Error message:
Traceback (most recent call last):
File "/Users/rishi/Projects/gemini_live/new.py", line 393, in
asyncio.run(main.run())
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/rishi/Projects/gemini_live/new.py", line 362, in run
async with (
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 204, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/google/genai/live.py", line 626, in connect
self._LiveSetup_to_mldev(model=transformed_model, config=config)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/google/genai/live.py", line 459, in _LiveSetup_to_mldev
_GenerateContentConfig_to_mldev(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/google/genai/models.py", line 894, in _GenerateContentConfig_to_mldev
t.t_speech_config(api_client, getv(from_object, ['speech_config'])),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/google/genai/_transformers.py", line 301, in t_speech_config
raise ValueError(f'Unsupported speechConfig type: {type(origin)}')
ValueError: Unsupported speechConfig type: <class 'dict'>
Actual vs expected behavior:
No response
Any other information you'd like to share?
No response
The text was updated successfully, but these errors were encountered: