From 60c8c2f6e97264759e746c3af88bdd15f52f0b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 24 Oct 2024 16:47:41 -0700 Subject: [PATCH] examples(15a): use daily transcription instead of local whisper --- examples/foundational/15a-switch-languages.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/foundational/15a-switch-languages.py b/examples/foundational/15a-switch-languages.py index f3310366a..c2af63ad8 100644 --- a/examples/foundational/15a-switch-languages.py +++ b/examples/foundational/15a-switch-languages.py @@ -10,7 +10,7 @@ import os import sys from pipecat.audio.vad.silero import SileroVADAnalyzer -from pipecat.frames.frames import LLMMessagesFrame +from pipecat.frames.frames import LLMMessagesFrame, TTSUpdateSettingsFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.parallel_pipeline import ParallelPipeline from pipecat.pipeline.runner import PipelineRunner @@ -19,7 +19,6 @@ from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext from pipecat.processors.filters.function_filter import FunctionFilter from pipecat.services.cartesia import CartesiaTTSService from pipecat.services.openai import OpenAILLMService -from pipecat.services.whisper import Model, WhisperSTTService from pipecat.transports.services.daily import DailyParams, DailyTransport from openai.types.chat import ChatCompletionToolParam @@ -61,16 +60,14 @@ async def main(): token, "Pipecat", DailyParams( - audio_in_enabled=True, audio_out_enabled=True, + transcription_enabled=True, vad_enabled=True, vad_analyzer=SileroVADAnalyzer(), vad_audio_passthrough=True, ), ) - stt = WhisperSTTService(model=Model.LARGE) - english_tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), voice_id="79a125e8-cd45-4c13-8a67-188112f4dd22", # British Lady @@ -116,7 +113,6 @@ async def main(): pipeline = Pipeline( [ transport.input(), # Transport user input - stt, # STT context_aggregator.user(), # User responses llm, # LLM ParallelPipeline( # TTS (bot will speak the chosen language)