# Error from STT while in console --text

**URL:** <https://community.livekit.io/t/error-from-stt-while-in-console-text/531>\
**Category:** Getting Started\
**Created:** [March 11, 2026, 12:27pm UTC](https://community.livekit.io/t/error-from-stt-while-in-console-text/531 "2026-03-11T12:27:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Torrellas\_Socastro](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/marc_torrellas_socastro/32/454_2.png) [@Marc\_Torrellas\_Socastro](https://community.livekit.io/u/Marc_Torrellas_Socastro)\
**Post date:** [March 11, 2026, 12:27pm UTC](https://community.livekit.io/t/error-from-stt-while-in-console-text/531/1 "2026-03-11T12:27:31Z")

</div>

I see

```auto

Traceback (most recent call last):
  File "/Users/marc/...../.venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 17, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/marc/....../.venv/lib/python3.12/site-packages/livekit/agents/inference/stt.py", line 559, in recv_task
    raise APIError(f"LiveKit Inference STT returned error: {msg.data}")
livekit.agents._exceptions.APIError: LiveKit Inference STT returned error: {"type":"error","session_id":"0fa56f82-54e7-4d1a-813a-a7e47e477b5f","message":"The client

    13:25:17.378 WARNI… livekit.agents failed to recognize speech: LiveKit Inference STT returned error:                                                        
                                           {"type":"error","session_id":"0fa56f82-54e7-4d1a-813a-a7e47e477b5f","message":"The client did not receive a websocket    
                                           Ping message in the last 60 seconds","code":2006}, retrying in 0.1s | extras: stt=livekit.agents.inference.stt.STT,      
                                           attempt=0, streamed=True   

```

I believe I didn’t have this before, at least not for livekit-agents \< 1.4. I just updated to 1.4.5.

Not blocking, but any ideas? Thanks!

---

<div class="post-metadata">

**Author:** ![CWilson](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/cwilson/32/135_2.png) [@CWilson](https://community.livekit.io/u/CWilson)\
**Post date:** [March 11, 2026, 12:41pm UTC](https://community.livekit.io/t/error-from-stt-while-in-console-text/531/2 "2026-03-11T12:41:35Z")

</div>

Do you see that all the time or just once? Looks a little like a network issue but I will try and reproduce.

Can you share your agent session setup like what LLM, STT, and TTS you are using?

Also can you share all the library versions you are running:

Just give the output for this so we can see all the versions:

`pip freeze |grep livekit`

---

<div class="post-metadata">

**Author:** ![Marc\_Torrellas\_Socastro](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/marc_torrellas_socastro/32/454_2.png) [@Marc\_Torrellas\_Socastro](https://community.livekit.io/u/Marc_Torrellas_Socastro)\
**Post date:** [March 12, 2026, 7:19am UTC](https://community.livekit.io/t/error-from-stt-while-in-console-text/531/3 "2026-03-12T07:19:25Z")

</div>

That’s when

╰─❯ uv run src/main.py console --text

I see what I posed after 1min. Then after 1min more

```auto
  08:11:29.258 WARNI… livekit.agents livekit.agents.inference.stt.STT failed, switching to next STT | extras:              
                                           streamed=True                                                                         
                                         {"streamed": true}
Traceback (most recent call last):
  File "/Users/marc/.../.venv/lib/python3.12/site-packages/livekit/agents/stt/stt.py", line 322, in _main_task
    return await self._run()
           ^^^^^^^^^^^^^^^^^
  File "/Users/marc/.../.venv/lib/python3.12/site-packages/livekit/agents/inference/stt.py", line 574, in _run
    await asyncio.gather(*tasks)
  File "/Users/marc/.../.venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 17, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/marc/.../.venv/lib/python3.12/site-packages/livekit/agents/inference/stt.py", line 559, in 
recv_task
    raise APIError(f"LiveKit Inference STT returned error: {msg.data}")
livekit.agents._exceptions.APIError: LiveKit Inference STT returned error: 
{"type":"error","session_id":"916ad661-e0a3-42fd-8143-69da11e9aa36","message":"The client did not receive a websocket Ping 
message in the last 60 seconds","code":2006}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/marc/.../.venv/lib/python3.12/site-packages/livekit/agents/stt/fallback_adapter.py", line 338, in 
_run
    async for ev in main_stream:
  File "/Users/marc/.../.venv/lib/python3.12/site-packages/livekit/agents/stt/stt.py", line 445, in __anext__
    raise exc # noqa: B904
    ^^^^^^^^^
  File "/Users/marc/.../.venv/lib/python3.12/site-packages/livekit/agents/stt/stt.py", line 329, in _main_task
    raise APIConnectionError(

```

and same every 1min. My config (simplfiied)

```auto
session = AgentSession[UserData](
        userdata=userdata,
        stt="deepgram/flux-general-en",
        llm="openai/gpt4.1",
        tts="cartesia/sonic-3",
        # **get_turn_detection_config(ctx),
        max_tool_steps=5,
        # user_away_timeout=USER_AWAY_TIMEOUT,
    )

```

versions

```auto
─❯ uv pip freeze | grep livekit
livekit==1.1.2
livekit-agents==1.4.4
livekit-api==1.0.7
livekit-blingfire==1.1.0
livekit-plugins-assemblyai==1.4.4
livekit-plugins-cartesia==1.4.4
livekit-plugins-deepgram==1.4.4
livekit-plugins-elevenlabs==1.4.4
livekit-plugins-google==1.4.4
livekit-plugins-noise-cancellation==0.2.5
livekit-plugins-openai==1.4.4
livekit-plugins-silero==1.4.4
livekit-plugins-turn-detector==1.4.4
livekit-protocol==1.1.0

```

---

<div class="post-metadata">

**Author:** ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)\
**Post date:** [March 12, 2026, 9:43am UTC](https://community.livekit.io/t/error-from-stt-while-in-console-text/531/4 "2026-03-12T09:43:28Z")

</div>

Hi Mark, I did some testing with this, this morning and it feels like a bug to me, so I’m checking with the team.

I can reproduce the issue with `console --text` and using the `flux` model but not with the `nova-3` model, so it’s related to the model, and also related to the WebSocket ping timeout I believe.

Other than not using flux during your console tests, there isn’t a workaround as far as I can see.

---

<div class="post-metadata">

**Author:** ![Marc\_Torrellas\_Socastro](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/marc_torrellas_socastro/32/454_2.png) [@Marc\_Torrellas\_Socastro](https://community.livekit.io/u/Marc_Torrellas_Socastro)\
**Post date:** [March 12, 2026, 11:23am UTC](https://community.livekit.io/t/error-from-stt-while-in-console-text/531/5 "2026-03-12T11:23:51Z")

</div>

ok, thanks for your answer. I have a lot of noise in the logs, so a bit more it’s ok 🙂 I assume this will fix on its own in a new release i.e. I won’t have to change anything, right?

---

<div class="post-metadata">

**Author:** ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)\
**Post date:** [March 12, 2026, 11:41am UTC](https://community.livekit.io/t/error-from-stt-while-in-console-text/531/6 "2026-03-12T11:41:29Z")

</div>

> assume this will fix on its own in a new release i.e. I won’t have to change anything, right?

Ideally, but I can’t guarantee that 🙂 … still following up internally, but I’ll post here when there are updates

---

<div class="post-metadata">

**Author:** ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)\
**Post date:** [March 13, 2026, 9:44am UTC](https://community.livekit.io/t/error-from-stt-while-in-console-text/531/7 "2026-03-13T09:44:03Z")

</div>

Just to update you, this will be fixed and I’m pretty sure you won’t need to do anything. I see the PR but since it’s related to LK inference, it’s in a private repo.
