From ce2ebd319833a9262a4b987a4e87580ca210c4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Mon, 10 Jun 2024 20:33:56 -0700 Subject: [PATCH] examples: updated 07c-interruptible-deepgram to usee DeepgramSTTService --- examples/foundational/07c-interruptible-deepgram.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/foundational/07c-interruptible-deepgram.py b/examples/foundational/07c-interruptible-deepgram.py index 818c8bc93..25be49a1c 100644 --- a/examples/foundational/07c-interruptible-deepgram.py +++ b/examples/foundational/07c-interruptible-deepgram.py @@ -15,7 +15,7 @@ from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_response import ( LLMAssistantResponseAggregator, LLMUserResponseAggregator) -from pipecat.services.deepgram import DeepgramTTSService +from pipecat.services.deepgram import DeepgramSTTService, DeepgramTTSService from pipecat.services.openai import OpenAILLMService from pipecat.transports.services.daily import DailyParams, DailyTransport from pipecat.vad.silero import SileroVADAnalyzer @@ -39,12 +39,14 @@ async def main(room_url: str, token): "Respond bot", DailyParams( audio_out_enabled=True, - transcription_enabled=True, vad_enabled=True, - vad_analyzer=SileroVADAnalyzer() + vad_analyzer=SileroVADAnalyzer(), + vad_audio_passthrough=True ) ) + stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) + tts = DeepgramTTSService( aiohttp_session=session, api_key=os.getenv("DEEPGRAM_API_KEY"), @@ -67,6 +69,7 @@ async def main(room_url: str, token): pipeline = Pipeline([ transport.input(), # Transport user input + stt, # STT tma_in, # User responses llm, # LLM tts, # TTS