这是indexloc提供的服务,不要输入任何密码
Skip to content

[Bug]: gradio-voice raises an exception upon pasting the Project ID and does not work #2198

@KelSolaar

Description

@KelSolaar

File Name

gemini/multimodal-live-api/gradio-voice

What happened?

Upon launching the App and pasting my Project ID, the following exception is raised:

[...]\gradio-voice>uv run app.py
* Running on local URL:  http://127.0.0.1:7860
* To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
  File "[...]\gradio-voice\.venv\Lib\site-packages\gradio\queueing.py", line 626, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "[...]\gradio-voice\.venv\Lib\site-packages\gradio\route_utils.py", line 350, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<11 lines>...
    )
    ^
  File "[...]\gradio-voice\.venv\Lib\site-packages\gradio\blocks.py", line 2231, in process_api
    inputs = await self.preprocess_data(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        block_fn, inputs, state, explicit_call
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "[...]\gradio-voice\.venv\Lib\site-packages\gradio\blocks.py", line 1897, in preprocess_data
    processed_input.append(block.preprocess(inputs_cached))
                           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "[...]\gradio-voice\.venv\Lib\site-packages\fastrtc\webrtc.py", line 224, in preprocess
    if isinstance(payload.root, str)
                  ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'root'
[...]\gradio-voice\app.py:100: DeprecationWarning: Setting `AsyncSession.start_stream` is deprecated, and will be removed in a future release (not before Q3 2025). Please use the `receive`, and `send_realtime_input`, methods instead.
  async for audio_response in async_aggregate_bytes_to_16bit(

I can then enable the mic and talk but there is no response.

Relevant log output

  File "[...]\gradio-voice\.venv\Lib\site-packages\fastrtc\webrtc.py", line 224, in preprocess
    if isinstance(payload.root, str)
                  ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'root'

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions