Skip to content

Conversation

@wg-daniel
Copy link
Contributor

This PR will;

  • Add Gladia session id to log for easier debugs as proposed in Add session IDs to Gladia logs #3138 by @clemos
  • Reset the _bytes_sent counter on a new connection to Gladia
  • Reset the _reconnection_attempts on a successful connect

Especially resetting the byte counter will avoid spamming tens of thousands lines like;

GladiaSTTService [cb647685-ce1a-4724-861c-bf454be72785] Audio buffer exceeded max size, trimmed 384 bytes

Proven by seeing many logs of the following, avoiding the former logs at high rates.

GladiaSTTService [515d18f2-9b57-4e34-b9e8-72fec2370eac] Resetting acknowledged byte counter for new session (was 1700480)

clemos and others added 3 commits December 12, 2025 14:43
Add logic to reset the byte counter for a new
session in GladiaSTTService. This ensures that the
audio processing starts afresh without carrying
over any previous session data.
Initialize the reconnection attempts counter to
zero when the WebSocket connection is established.
This change ensures that reconnection logic starts
fresh after a successful connection.
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 6.25000% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipecat/services/gladia/stt.py 0.00% 15 Missing ⚠️
Files with missing lines Coverage Δ
src/pipecat/utils/time.py 42.85% <100.00%> (ø)
src/pipecat/services/gladia/stt.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Change the time formatting in the time_now_iso8601
function to return the current UTC time in ISO8601
format with microsecond precision instead of
millisecond precision.
@wg-daniel
Copy link
Contributor Author

Don't see how the failing test related to my changes. My fork is up to date with your main and that was not failing. 🤷
Anyway, managed to fix it.

@wg-daniel
Copy link
Contributor Author

wg-daniel commented Dec 12, 2025

@clemos Could you to take a look at this PR as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants