Add changelog for #4340

This commit is contained in:
Mark Backman
2026-04-20 19:03:34 -04:00
parent c091232f2f
commit b838bd906b
3 changed files with 2 additions and 5 deletions

1
changelog/4340.added.md Normal file
View File

@@ -0,0 +1 @@
- Added `XAISTTService` for real-time speech-to-text using xAI's voice STT WebSocket API (`wss://api.x.ai/v1/stt`). Streams raw audio (PCM, µ-law, or A-law) and emits interim and final transcription frames driven by the server's `is_final` / `speech_final` flags. Settings expose `interim_results`, `endpointing`, `language`, `multichannel`, `channels`, and `diarize`. Requires the `xai` optional extra (`pip install "pipecat-ai[xai]"`).

View File

@@ -9,12 +9,10 @@ import os
from dotenv import load_dotenv
from loguru import logger
from pipecat.audio.vad.silero import SileroVADAnalyzer
from pipecat.frames.frames import Frame, TranscriptionFrame
from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.runner import PipelineRunner
from pipecat.pipeline.task import PipelineTask
from pipecat.processors.audio.vad_processor import VADProcessor
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
from pipecat.runner.types import RunnerArguments
from pipecat.runner.utils import create_transport
@@ -58,9 +56,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
)
tl = TranscriptionLogger()
vad_processor = VADProcessor(vad_analyzer=SileroVADAnalyzer())
pipeline = Pipeline([transport.input(), vad_processor, stt, tl])
pipeline = Pipeline([transport.input(), stt, tl])
task = PipelineTask(
pipeline,

View File

@@ -321,7 +321,6 @@ class XAISTTService(WebsocketSTTService):
async def _handle_message(self, message: dict[str, Any]):
"""Branch on xAI STT event type."""
msg_type = message.get("type")
print(f"xAI STT message: {message}")
if msg_type == "transcript.created":
self._session_ready.set()