examples: rely on new daily default transcription settings
This commit is contained in:
@@ -76,8 +76,6 @@ async def main(room_url: str, token):
|
|||||||
{"role": "system", "content": "Please introduce yourself to the user."})
|
{"role": "system", "content": "Please introduce yourself to the user."})
|
||||||
await pipeline.queue_frames([LLMMessagesFrame(messages)])
|
await pipeline.queue_frames([LLMMessagesFrame(messages)])
|
||||||
|
|
||||||
transport.transcription_settings["extra"]["endpointing"] = True
|
|
||||||
transport.transcription_settings["extra"]["punctuate"] = True
|
|
||||||
await transport.run(pipeline)
|
await transport.run(pipeline)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -47,13 +47,12 @@ async def main(room_url: str, token):
|
|||||||
token,
|
token,
|
||||||
"Respond bot",
|
"Respond bot",
|
||||||
5,
|
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(
|
tts = ElevenLabsTTSService(
|
||||||
aiohttp_session=session,
|
aiohttp_session=session,
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ async def main(room_url: str, token):
|
|||||||
pre_processor=LLMUserResponseAggregator(messages),
|
pre_processor=LLMUserResponseAggregator(messages),
|
||||||
)
|
)
|
||||||
|
|
||||||
transport.transcription_settings["extra"]["punctuate"] = False
|
|
||||||
await asyncio.gather(transport.run(), run_conversation())
|
await asyncio.gather(transport.run(), run_conversation())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -129,12 +129,6 @@ async def main(room_url: str, token):
|
|||||||
camera_width=720,
|
camera_width=720,
|
||||||
camera_height=1280,
|
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(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ async def main(room_url: str, token):
|
|||||||
mic_sample_rate=16000,
|
mic_sample_rate=16000,
|
||||||
camera_enabled=False,
|
camera_enabled=False,
|
||||||
)
|
)
|
||||||
transport.transcription_settings["extra"]["punctuate"] = True
|
|
||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ async def main(room_url: str, token):
|
|||||||
async for audio in audio_generator:
|
async for audio in audio_generator:
|
||||||
transport.output_queue.put(Frame(FrameType.AUDIO_FRAME, audio))
|
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())
|
await asyncio.gather(transport.run(), handle_transcriptions())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -127,8 +127,6 @@ async def main(room_url: str, token, phone):
|
|||||||
transport.start_recording()
|
transport.start_recording()
|
||||||
transport.dialout(phone)
|
transport.dialout(phone)
|
||||||
|
|
||||||
transport.transcription_settings["extra"]["punctuate"] = True
|
|
||||||
|
|
||||||
await asyncio.gather(transport.run(), handle_transcriptions())
|
await asyncio.gather(transport.run(), handle_transcriptions())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -139,8 +139,6 @@ async def main(room_url: str, token):
|
|||||||
pre_processor=LLMUserResponseAggregator(messages),
|
pre_processor=LLMUserResponseAggregator(messages),
|
||||||
)
|
)
|
||||||
|
|
||||||
transport.transcription_settings["extra"]["endpointing"] = True
|
|
||||||
transport.transcription_settings["extra"]["punctuate"] = True
|
|
||||||
await asyncio.gather(transport.run(), run_conversation())
|
await asyncio.gather(transport.run(), run_conversation())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -340,8 +340,6 @@ async def main(room_url: str, token):
|
|||||||
pre_processor=OpenAIUserContextAggregator(context),
|
pre_processor=OpenAIUserContextAggregator(context),
|
||||||
)
|
)
|
||||||
|
|
||||||
transport.transcription_settings["extra"]["endpointing"] = True
|
|
||||||
transport.transcription_settings["extra"]["punctuate"] = True
|
|
||||||
try:
|
try:
|
||||||
await asyncio.gather(transport.run(), handle_intake())
|
await asyncio.gather(transport.run(), handle_intake())
|
||||||
except (asyncio.CancelledError, KeyboardInterrupt):
|
except (asyncio.CancelledError, KeyboardInterrupt):
|
||||||
|
|||||||
@@ -278,8 +278,6 @@ async def main(room_url: str, token):
|
|||||||
pipeline,
|
pipeline,
|
||||||
)
|
)
|
||||||
|
|
||||||
transport.transcription_settings["extra"]["endpointing"] = True
|
|
||||||
transport.transcription_settings["extra"]["punctuate"] = True
|
|
||||||
try:
|
try:
|
||||||
await asyncio.gather(transport.run(), storytime())
|
await asyncio.gather(transport.run(), storytime())
|
||||||
except (asyncio.CancelledError, KeyboardInterrupt):
|
except (asyncio.CancelledError, KeyboardInterrupt):
|
||||||
|
|||||||
@@ -99,8 +99,6 @@ async def main(room_url: str, token):
|
|||||||
ts = TranslationSubtitles("spanish")
|
ts = TranslationSubtitles("spanish")
|
||||||
pipeline = Pipeline([sa, tp, llm, lfra, ts, tts])
|
pipeline = Pipeline([sa, tp, llm, lfra, ts, tts])
|
||||||
|
|
||||||
transport.transcription_settings["extra"]["endpointing"] = True
|
|
||||||
transport.transcription_settings["extra"]["punctuate"] = True
|
|
||||||
await transport.run(pipeline)
|
await transport.run(pipeline)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user