feat: add Smallest AI STT service integration (#4162)
Add SmallestSTTService using the Pulse WebSocket API for real-time transcription. Includes SmallestSTTSettings dataclass, 32-language support with resolve_language fallback, VAD-driven finalize signal, and SMALLEST_TTFS_P99 latency constant. Also adds X-Source and X-Pipecat-Version headers to Smallest STT and TTS WebSocket connections.
This commit is contained in:
@@ -21,9 +21,10 @@ from pipecat.processors.aggregators.llm_response_universal import (
|
||||
)
|
||||
from pipecat.runner.types import RunnerArguments
|
||||
from pipecat.runner.utils import create_transport
|
||||
from pipecat.services.deepgram.stt import DeepgramSTTService
|
||||
from pipecat.services.openai.llm import OpenAILLMService
|
||||
from pipecat.services.smallest.stt import SmallestSTTService
|
||||
from pipecat.services.smallest.tts import SmallestTTSService
|
||||
from pipecat.transcriptions.language import Language
|
||||
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
||||
from pipecat.transports.daily.transport import DailyParams
|
||||
from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams
|
||||
@@ -50,8 +51,11 @@ transport_params = {
|
||||
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
logger.info(f"Starting bot")
|
||||
|
||||
stt = DeepgramSTTService(
|
||||
api_key=os.getenv("DEEPGRAM_API_KEY"),
|
||||
stt = SmallestSTTService(
|
||||
api_key=os.getenv("SMALLEST_API_KEY"),
|
||||
settings=SmallestSTTService.Settings(
|
||||
language=Language.EN,
|
||||
),
|
||||
)
|
||||
|
||||
tts = SmallestTTSService(
|
||||
|
||||
Reference in New Issue
Block a user