Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google STT times out at 5 minutes and crashes agent #1258

Open
nickderobertis opened this issue Dec 19, 2024 · 1 comment
Open

Google STT times out at 5 minutes and crashes agent #1258

nickderobertis opened this issue Dec 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nickderobertis
Copy link

Google STT seems to consistently fail at 5 minutes into the call with the following error:

2024-12-18 15:59:58,786 - ERROR livekit.agents.pipeline - Error in _recognize_task
Traceback (most recent call last):
  File "/Users/nick/repos/hellopatient/lk_agent/.venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nick/repos/hellopatient/lk_agent/.venv/lib/python3.12/site-packages/livekit/agents/pipeline/human_input.py", line 150, in _recognize_task
    await asyncio.gather(*tasks)
  File "/Users/nick/repos/hellopatient/lk_agent/.venv/lib/python3.12/site-packages/livekit/agents/pipeline/human_input.py", line 120, in _audio_stream_co
    stt_stream.push_frame(ev.frame)
  File "/Users/nick/repos/hellopatient/lk_agent/.venv/lib/python3.12/site-packages/livekit/agents/stt/stt.py", line 265, in push_frame
    self._check_not_closed()
  File "/Users/nick/repos/hellopatient/lk_agent/.venv/lib/python3.12/site-packages/livekit/agents/stt/stt.py", line 327, in _check_not_closed
    raise RuntimeError(f"{cls.__module__}.{cls.__name__} is closed")
RuntimeError: livekit.plugins.google.stt.SpeechStream is closed {"pid": 54793, "job_id": "AJ_zKEGnh4r4ttx"}

Unfortunately it's an unhandled error and so even though we were using it with in the FallbackAdapter our agent stops responding completely at 5 minutes into the call.

I have worked with the Google API before and I know it times out the streaming connection at 5 minutes so I imagine that is the issue. There's an official tutorial on endless streaming that shows how to switch to a new request and stitch them together in real-time.

@nickderobertis nickderobertis added the bug Something isn't working label Dec 19, 2024
@potate4
Copy link

potate4 commented Dec 26, 2024

image
same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants