Skip to content

Conversation

adithyaxx
Copy link
Contributor

Issue

Deepgram's Python SDK produces slow TTS outputs with ~2.1s average TTFB.

Solution

Switch to direct HTTP POST requests, reducing average TTFB to ~0.8s (more than 2x faster).

Copy link

codecov bot commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.

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

@aconchillo
Copy link
Contributor

aconchillo commented Sep 23, 2025

Issue

Deepgram's Python SDK produces slow TTS outputs with ~2.1s average TTFB.

Solution

Switch to direct HTTP POST requests, reducing average TTFB to ~0.8s (more than 2x faster).

Wow! I don't think we'll have time to take a look at this before the upcoming release, but very interesting. I'm wondering if we are doing something wrong in our current code.

@adithyaxx
Copy link
Contributor Author

@aconchillo I feel the current implementation is correct since it follows Deepgram's documentation. However, comparing it to direct API calls shows a difference in TTFB, suggesting the additional delays are coming from Deepgram's Python SDK itself. This finding came from comparing the implementation in World’s Fastest Talking AI: Deepgram + Groq with Pipecat's implementation.

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