DEV Community

Florian
Florian

Posted on

The provider still bills the open STT socket after the browser hangs up

Gladia bills the upstream live WebSocket by wall clock. A Socket.IO blip can drop the browser while that job is still open.

On detach the service flushes provider cost and user billing, then sets socketDetached. flushWallClockBilling skips a session once that flag is set, so the user side stays at the flush. flushPeriodicCost keeps running. The open Gladia socket is still provider spend, and that path still feeds the daily kill-switch.

Detach grace is 8 seconds, from env. A reload gets a new Gladia id. The previous job is not resumed, and only one live slot is allowed.

LiveSuggest splits those two flushes so the blip does not have to close the STT job.

Top comments (0)