Skip to content

Add Smallest AI STT and TTS service integrations#3897

Open
harshitajain165 wants to merge 6 commits intopipecat-ai:mainfrom
harshitajain165:pipecat-smallest-stt-tts-integration
Open

Add Smallest AI STT and TTS service integrations#3897
harshitajain165 wants to merge 6 commits intopipecat-ai:mainfrom
harshitajain165:pipecat-smallest-stt-tts-integration

Conversation

@harshitajain165
Copy link

@harshitajain165 harshitajain165 commented Mar 2, 2026

Summary

  • Add Smallest AI speech-to-text and text-to-speech service integrations with both HTTP and WebSocket variants:
    • SmallestSTTService — HTTP-based segmented STT using the Pulse model
    • SmallestRealtimeSTTService — WebSocket-based real-time streaming STT with interim/final transcripts
    • SmallestTTSService — WebSocket-based streaming TTS with interruption support
    • SmallestHttpTTSService — HTTP-based TTS
  • Add smallest optional dependency group in pyproject.toml (httpx, numpy, soundfile, websockets)
  • Add SMALLEST_TTFS_P99 latency constant in stt_latency.py
  • Add two foundational example scripts demonstrating full conversational bot pipelines using Smallest AI services

Changes

File Description
src/pipecat/services/smallest/__init__.py Package init with DeprecatedModuleProxy
src/pipecat/services/smallest/stt.py HTTP (SmallestSTTService) and WebSocket (SmallestRealtimeSTTService) STT implementations
src/pipecat/services/smallest/tts.py WebSocket (SmallestTTSService) and HTTP (SmallestHttpTTSService) TTS implementations
src/pipecat/services/stt_latency.py Added SMALLEST_TTFS_P99 constant
pyproject.toml Added smallest extras group
uv.lock Auto-updated lockfile
examples/foundational/07zl-interruptible-smallest.py Example bot using WebSocket STT + TTS
examples/foundational/07zl-interruptible-smallest-http.py Example bot using HTTP STT + TTS

Test plan

  • Verified all four services against the live Smallest AI API (HTTP STT, Realtime STT, HTTP TTS, WebSocket TTS)
  • Confirmed no linting errors (ruff check and ruff format)
  • Structure follows existing service integration patterns (Deepgram, ElevenLabs, Sarvam, etc.)

Harshita Jain added 5 commits March 10, 2026 13:35
- STT: Update model from lightning to pulse with new API URL
- STT: Add SmallestRealtimeSTTService using Pulse WebSocket API
  for low-latency streaming transcription
- TTS: Add lightning-v3.1 model and set as default
- stt_latency: Add SMALLEST_TTFS_P99 constant

Made-with: Cursor
Migrate STT/TTS services from deprecated set_model_name()/set_voice() to the
new ServiceSettings pattern (STTSettings/TTSSettings). Add default voice_id
("sophia") for TTS services, fix voice references, and include two foundational
example scripts showing WebSocket and HTTP usage.

Made-with: Cursor
@harshitajain165 harshitajain165 force-pushed the pipecat-smallest-stt-tts-integration branch from f144845 to 6c67264 Compare March 10, 2026 20:37
Copy link
Contributor

@markbackman markbackman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission!

Is it worth considering a simpler implementation where there's only one service implementation per module? The goal would be to select the implementation best suited for real-time use cases. I think this would make sense for STT, especially as a websocket implementation is superior to HTTP. The same can be true of TTS.

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