pipecat version
0.0.102
Python version
3.12.3
Operating System
Ubuntu 24.04
Issue description
In rare occasions the DeepgramSTTService does not return a transcript for whatever reason noted by the "processing time" not being reported after the TTFB which i believe is the moment the network request is made.
Reproduction steps
I'm not sure how to debug this or recreate this as it happens very rarely, but if you make a fake STT server that simply hangs when it receives a response and set that to the base_url of the OpenaAISTTService it shows the same behavior of reporting TTFB and then no processing time until whatever idle logic is present executes.
Expected behavior
I believe there should be a timeout and retry here.
Actual behavior
No transcript is made and the call hangs until the user speaks.
Logs
Usually if the service responds normally, I get logs in this order:
DeepgramSTTService#2: Websocket connection initialized: {"headers": {'dg-project-id': '3b7d413d-***-8822a6603950', 'dg-request-id': '019d8c4f-***-a5e5ca04b4dc'}}
DeepgramSTTService#2 TTFB: 0.646s
DeepgramSTTService#2 processing time: 0.168s
** Generate the next response from user transcript **
OpenAILLMService#7: Generating chat from universal context [...]
When it breaks, i get the TTFB but I don't get the processing time or transcript for the next 30 or more seconds, and I have an idle timeout logic that kicks into to generate a response from the LLM.
DeepgramSTTService#2: Websocket connection initialized: {"headers": {'dg-project-id': '3b7d413d-***-8822a6603950', 'dg-request-id': '019d8c4f-***-a5e5ca04b4dc'}}
DeepgramSTTService#2 TTFB: 2.202s
** 30s pass and idle timeout strikes **
OpenAILLMService#7: Generating chat from universal context [...]
pipecat version
0.0.102
Python version
3.12.3
Operating System
Ubuntu 24.04
Issue description
In rare occasions the DeepgramSTTService does not return a transcript for whatever reason noted by the "processing time" not being reported after the TTFB which i believe is the moment the network request is made.
Reproduction steps
I'm not sure how to debug this or recreate this as it happens very rarely, but if you make a fake STT server that simply hangs when it receives a response and set that to the
base_urlof the OpenaAISTTService it shows the same behavior of reporting TTFB and then no processing time until whatever idle logic is present executes.Expected behavior
I believe there should be a timeout and retry here.
Actual behavior
No transcript is made and the call hangs until the user speaks.
Logs
Usually if the service responds normally, I get logs in this order:
DeepgramSTTService#2: Websocket connection initialized: {"headers": {'dg-project-id': '3b7d413d-***-8822a6603950', 'dg-request-id': '019d8c4f-***-a5e5ca04b4dc'}} DeepgramSTTService#2 TTFB: 0.646s DeepgramSTTService#2 processing time: 0.168s ** Generate the next response from user transcript ** OpenAILLMService#7: Generating chat from universal context [...]When it breaks, i get the TTFB but I don't get the processing time or transcript for the next 30 or more seconds, and I have an idle timeout logic that kicks into to generate a response from the LLM.
DeepgramSTTService#2: Websocket connection initialized: {"headers": {'dg-project-id': '3b7d413d-***-8822a6603950', 'dg-request-id': '019d8c4f-***-a5e5ca04b4dc'}} DeepgramSTTService#2 TTFB: 2.202s ** 30s pass and idle timeout strikes ** OpenAILLMService#7: Generating chat from universal context [...]