This commit is contained in:
Kwindla Hultman Kramer
2024-06-12 07:54:18 -07:00
parent 294b037730
commit 448a0307a8
2 changed files with 9 additions and 5 deletions

View File

@@ -74,7 +74,10 @@ async def main(room_url: str, token):
tma_out # Assistant spoken responses
])
task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True))
task = PipelineTask(pipeline, PipelineParams(
allow_interruptions=True,
enable_metrics=True
))
@transport.event_handler("on_first_participant_joined")
async def on_first_participant_joined(transport, participant):

View File

@@ -48,13 +48,14 @@ async def main(room_url: str, token):
tts = DeepgramTTSService(
aiohttp_session=session,
api_key=os.getenv("DEEPGRAM_API_KEY"),
# voice="aura-helios-en"
base_url="https://api.deepgram.com/v1/speak"
)
llm = OpenAILLMService(
api_key=os.getenv("OPENAI_API_KEY"),
model="gpt-4o")
# api_key=os.getenv("OPENAI_API_KEY"),
# model="gpt-4o"
model="meta-llama/Meta-Llama-3-8B-Instruct",
base_url="http://0.0.0.0:8000/v1"
)
messages = [
{