From 7336866a1c0bf6356d1e6696346b693362e5be6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 11 Apr 2024 11:22:58 -0700 Subject: [PATCH] examples: rely on new daily default transcription settings --- examples/foundational/06-listen-and-respond.py | 2 -- examples/foundational/06a-image-sync.py | 11 +++++------ examples/foundational/07-interruptible.py | 1 - examples/foundational/10-wake-word.py | 6 ------ examples/foundational/11-sound-effects.py | 1 - examples/image-gen.py | 2 -- examples/internal/11a-dial-out.py | 2 -- examples/starter-apps/chatbot.py | 2 -- examples/starter-apps/patient-intake.py | 2 -- examples/starter-apps/storybot.py | 2 -- examples/starter-apps/translator.py | 2 -- 11 files changed, 5 insertions(+), 28 deletions(-) diff --git a/examples/foundational/06-listen-and-respond.py b/examples/foundational/06-listen-and-respond.py index 73e9f3c6e..0de16b270 100644 --- a/examples/foundational/06-listen-and-respond.py +++ b/examples/foundational/06-listen-and-respond.py @@ -76,8 +76,6 @@ async def on_first_other_participant_joined(transport, participant): {"role": "system", "content": "Please introduce yourself to the user."}) await pipeline.queue_frames([LLMMessagesFrame(messages)]) - transport.transcription_settings["extra"]["endpointing"] = True - transport.transcription_settings["extra"]["punctuate"] = True await transport.run(pipeline) diff --git a/examples/foundational/06a-image-sync.py b/examples/foundational/06a-image-sync.py index fbc2aaaa7..912586ec4 100644 --- a/examples/foundational/06a-image-sync.py +++ b/examples/foundational/06a-image-sync.py @@ -47,13 +47,12 @@ async def main(room_url: str, token): token, "Respond bot", 5, + camera_enabled=True, + camera_width=1024, + camera_height=1024, + mic_enabled=True, + mic_sample_rate=16000, ) - transport._camera_enabled = True - transport._camera_width = 1024 - transport._camera_height = 1024 - transport._mic_enabled = True - transport._mic_sample_rate = 16000 - transport.transcription_settings["extra"]["punctuate"] = True tts = ElevenLabsTTSService( aiohttp_session=session, diff --git a/examples/foundational/07-interruptible.py b/examples/foundational/07-interruptible.py index eafcf2cc6..3f35a3536 100644 --- a/examples/foundational/07-interruptible.py +++ b/examples/foundational/07-interruptible.py @@ -67,7 +67,6 @@ async def run_conversation(): pre_processor=LLMUserResponseAggregator(messages), ) - transport.transcription_settings["extra"]["punctuate"] = False await asyncio.gather(transport.run(), run_conversation()) diff --git a/examples/foundational/10-wake-word.py b/examples/foundational/10-wake-word.py index 0546b5305..4d997153a 100644 --- a/examples/foundational/10-wake-word.py +++ b/examples/foundational/10-wake-word.py @@ -129,12 +129,6 @@ async def main(room_url: str, token): camera_width=720, camera_height=1280, ) - transport._mic_enabled = True - transport._mic_sample_rate = 16000 - transport._camera_enabled = True - transport._camera_width = 720 - transport._camera_height = 1280 - transport.transcription_settings["extra"]["punctuate"] = True llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), diff --git a/examples/foundational/11-sound-effects.py b/examples/foundational/11-sound-effects.py index 68faa8a3a..ee8a29ce3 100644 --- a/examples/foundational/11-sound-effects.py +++ b/examples/foundational/11-sound-effects.py @@ -82,7 +82,6 @@ async def main(room_url: str, token): mic_sample_rate=16000, camera_enabled=False, ) - transport.transcription_settings["extra"]["punctuate"] = True llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), diff --git a/examples/image-gen.py b/examples/image-gen.py index 6b1efbf76..30d207447 100644 --- a/examples/image-gen.py +++ b/examples/image-gen.py @@ -77,8 +77,6 @@ async def on_participant_joined(transport, participant): async for audio in audio_generator: transport.output_queue.put(Frame(FrameType.AUDIO_FRAME, audio)) - transport.transcription_settings["extra"]["punctuate"] = False - transport.transcription_settings["extra"]["endpointing"] = False await asyncio.gather(transport.run(), handle_transcriptions()) diff --git a/examples/internal/11a-dial-out.py b/examples/internal/11a-dial-out.py index 98518f9eb..2f3c456fc 100644 --- a/examples/internal/11a-dial-out.py +++ b/examples/internal/11a-dial-out.py @@ -127,8 +127,6 @@ async def on_call_state_updated(transport, state): transport.start_recording() transport.dialout(phone) - transport.transcription_settings["extra"]["punctuate"] = True - await asyncio.gather(transport.run(), handle_transcriptions()) diff --git a/examples/starter-apps/chatbot.py b/examples/starter-apps/chatbot.py index 291825c24..a46f54c5a 100644 --- a/examples/starter-apps/chatbot.py +++ b/examples/starter-apps/chatbot.py @@ -139,8 +139,6 @@ async def run_conversation(): pre_processor=LLMUserResponseAggregator(messages), ) - transport.transcription_settings["extra"]["endpointing"] = True - transport.transcription_settings["extra"]["punctuate"] = True await asyncio.gather(transport.run(), run_conversation()) diff --git a/examples/starter-apps/patient-intake.py b/examples/starter-apps/patient-intake.py index f00d06b0d..33ced7074 100644 --- a/examples/starter-apps/patient-intake.py +++ b/examples/starter-apps/patient-intake.py @@ -340,8 +340,6 @@ async def handle_intake(): pre_processor=OpenAIUserContextAggregator(context), ) - transport.transcription_settings["extra"]["endpointing"] = True - transport.transcription_settings["extra"]["punctuate"] = True try: await asyncio.gather(transport.run(), handle_intake()) except (asyncio.CancelledError, KeyboardInterrupt): diff --git a/examples/starter-apps/storybot.py b/examples/starter-apps/storybot.py index d13c14d42..3d54c4dd1 100644 --- a/examples/starter-apps/storybot.py +++ b/examples/starter-apps/storybot.py @@ -278,8 +278,6 @@ async def storytime(): pipeline, ) - transport.transcription_settings["extra"]["endpointing"] = True - transport.transcription_settings["extra"]["punctuate"] = True try: await asyncio.gather(transport.run(), storytime()) except (asyncio.CancelledError, KeyboardInterrupt): diff --git a/examples/starter-apps/translator.py b/examples/starter-apps/translator.py index 5b8c3286b..382fc57f4 100644 --- a/examples/starter-apps/translator.py +++ b/examples/starter-apps/translator.py @@ -99,8 +99,6 @@ async def main(room_url: str, token): ts = TranslationSubtitles("spanish") pipeline = Pipeline([sa, tp, llm, lfra, ts, tts]) - transport.transcription_settings["extra"]["endpointing"] = True - transport.transcription_settings["extra"]["punctuate"] = True await transport.run(pipeline)