Skip to content

Commit

Permalink
examples: rely on new daily default transcription settings
Browse files Browse the repository at this point in the history
  • Loading branch information
aconchillo committed Apr 11, 2024
1 parent 0f23282 commit 7336866
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 28 deletions.
2 changes: 0 additions & 2 deletions examples/foundational/06-listen-and-respond.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
11 changes: 5 additions & 6 deletions examples/foundational/06a-image-sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion examples/foundational/07-interruptible.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())


Expand Down
6 changes: 0 additions & 6 deletions examples/foundational/10-wake-word.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
1 change: 0 additions & 1 deletion examples/foundational/11-sound-effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 0 additions & 2 deletions examples/image-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())


Expand Down
2 changes: 0 additions & 2 deletions examples/internal/11a-dial-out.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())


Expand Down
2 changes: 0 additions & 2 deletions examples/starter-apps/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())


Expand Down
2 changes: 0 additions & 2 deletions examples/starter-apps/patient-intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions examples/starter-apps/storybot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions examples/starter-apps/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 7336866

Please sign in to comment.