From dea80cf946ca524a9f739f14558bc95d2166c9b1 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Fri, 5 Dec 2025 10:23:36 -0500 Subject: [PATCH] Add full transcript result for CartesiaSTTService --- CHANGELOG.md | 15 +++++++++++---- src/pipecat/services/cartesia/stt.py | 3 ++- uv.lock | 6 +++++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c69a1b261..a0693972c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added -- Added new languages to AsyncAI in `AsyncAITTSService` and `AsyncAIHttpTTSService`. - New `languages`: `pt`, `nl`, `ar`, `ru`, `ro`, `ja`, `he`, `hy`, `tr`, `hi`, `zh`. - -- Updated the default AsyncAI TTS model to asyncflow_multilingual_v1.0 for improved accuracy and broader language coverage. + +- Added new languages to AsyncAI in `AsyncAITTSService` and + `AsyncAIHttpTTSService`. New `languages`: `pt`, `nl`, `ar`, `ru`, `ro`, `ja`, + `he`, `hy`, `tr`, `hi`, `zh`. + +- Updated the default AsyncAI TTS model to `asyncflow_multilingual_v1.0` for + improved accuracy and broader language coverage. - Added `wait_for_all` argument to the base `LLMService`. When enabled, this ensures all function calls complete before returning results to the LLM (i.e., @@ -22,6 +25,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Updated `CartesiaSTTService` to return the full transcription `result` in the + `TranscriptionFrame` and `InterimTranscriptionFrame`. This provides access to + word timestamp data. + - If an unexpected exception is caught, or if `FrameProcessor.push_error()` is called with an exception, the file name and line number where the exception occured are now logged. diff --git a/src/pipecat/services/cartesia/stt.py b/src/pipecat/services/cartesia/stt.py index 135f4a347..0477fe6c8 100644 --- a/src/pipecat/services/cartesia/stt.py +++ b/src/pipecat/services/cartesia/stt.py @@ -20,7 +20,6 @@ from loguru import logger from pipecat.frames.frames import ( CancelFrame, EndFrame, - ErrorFrame, Frame, InterimTranscriptionFrame, StartFrame, @@ -349,6 +348,7 @@ class CartesiaSTTService(WebsocketSTTService): self._user_id, time_now_iso8601(), language, + result=data, ) ) await self._handle_transcription(transcript, is_final, language) @@ -361,5 +361,6 @@ class CartesiaSTTService(WebsocketSTTService): self._user_id, time_now_iso8601(), language, + result=data, ) ) diff --git a/uv.lock b/uv.lock index da1b785a1..df5b46218 100644 --- a/uv.lock +++ b/uv.lock @@ -4496,6 +4496,9 @@ google = [ { name = "google-genai" }, { name = "websockets" }, ] +gradium = [ + { name = "websockets" }, +] groq = [ { name = "groq" }, ] @@ -4730,6 +4733,7 @@ requires-dist = [ { name = "pipecat-ai", extras = ["websockets-base"], marker = "extra == 'fish'" }, { name = "pipecat-ai", extras = ["websockets-base"], marker = "extra == 'gladia'" }, { name = "pipecat-ai", extras = ["websockets-base"], marker = "extra == 'google'" }, + { name = "pipecat-ai", extras = ["websockets-base"], marker = "extra == 'gradium'" }, { name = "pipecat-ai", extras = ["websockets-base"], marker = "extra == 'heygen'" }, { name = "pipecat-ai", extras = ["websockets-base"], marker = "extra == 'lmnt'" }, { name = "pipecat-ai", extras = ["websockets-base"], marker = "extra == 'neuphonic'" }, @@ -4771,7 +4775,7 @@ requires-dist = [ { name = "wait-for2", marker = "python_full_version < '3.12'", specifier = ">=0.4.1" }, { name = "websockets", marker = "extra == 'websockets-base'", specifier = ">=13.1,<16.0" }, ] -provides-extras = ["aic", "anthropic", "assemblyai", "asyncai", "aws", "aws-nova-sonic", "azure", "cartesia", "cerebras", "daily", "deepgram", "deepseek", "elevenlabs", "fal", "fireworks", "fish", "gladia", "google", "grok", "groq", "gstreamer", "heygen", "hume", "inworld", "koala", "krisp", "langchain", "livekit", "lmnt", "local", "local-smart-turn", "local-smart-turn-v3", "mcp", "mem0", "mistral", "mlx-whisper", "moondream", "neuphonic", "noisereduce", "nvidia", "openai", "openpipe", "openrouter", "perplexity", "playht", "qwen", "remote-smart-turn", "rime", "riva", "runner", "sagemaker", "sambanova", "sarvam", "sentry", "silero", "simli", "soniox", "soundfile", "speechmatics", "strands", "tavus", "together", "tracing", "ultravox", "webrtc", "websocket", "websockets-base", "whisper"] +provides-extras = ["aic", "anthropic", "assemblyai", "asyncai", "aws", "aws-nova-sonic", "azure", "cartesia", "cerebras", "daily", "deepgram", "deepseek", "elevenlabs", "fal", "fireworks", "fish", "gladia", "google", "gradium", "grok", "groq", "gstreamer", "heygen", "hume", "inworld", "koala", "krisp", "langchain", "livekit", "lmnt", "local", "local-smart-turn", "local-smart-turn-v3", "mcp", "mem0", "mistral", "mlx-whisper", "moondream", "neuphonic", "noisereduce", "nvidia", "openai", "openpipe", "openrouter", "perplexity", "playht", "qwen", "remote-smart-turn", "rime", "riva", "runner", "sagemaker", "sambanova", "sarvam", "sentry", "silero", "simli", "soniox", "soundfile", "speechmatics", "strands", "tavus", "together", "tracing", "ultravox", "webrtc", "websocket", "websockets-base", "whisper"] [package.metadata.requires-dev] dev = [