generative-ai icon indicating copy to clipboard operation
generative-ai copied to clipboard

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

Open KelSolaar opened this issue 5 months ago • 2 comments

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

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

KelSolaar avatar Jul 23 '25 03:07 KelSolaar

@freddyaboulton

holtskinner avatar Oct 21 '25 14:10 holtskinner

I can take a look this week!

freddyaboulton avatar Oct 21 '25 21:10 freddyaboulton