Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41936d4

Browse files
committed
improve
1 parent 0c1a060 commit 41936d4

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

agent_telephony/twilio_livekit/agent_twilio/src/agents/agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ async def end(self, end: EndEvent) -> EndEvent:
154154
room_id=self.room_id, text="Thank you for calling restack. Goodbye!"
155155
),
156156
)
157+
await agent.sleep(1)
157158
await agent.step(function=livekit_delete_room)
158159

159160
self.end = True

agent_telephony/twilio_livekit/agent_twilio/src/workflows/logic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ async def run(self, workflow_input: LogicWorkflowInput) -> str:
122122
),
123123
)
124124

125+
await workflow.sleep(1)
126+
125127
await workflow.step(
126128
function=send_agent_event,
127129
function_input=SendAgentEventInput(

agent_telephony/twilio_livekit/livekit_pipeline/src/pipeline.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,27 @@ def create_livekit_pipeline(
3535
)
3636
return VoicePipelineAgent(
3737
vad=ctx.proc.userdata["vad"],
38-
stt=deepgram.STT(),
38+
stt=deepgram.STT(
39+
model="nova-3-general",
40+
),
3941
llm=openai.LLM(
4042
api_key=f"{agent_id}-livekit",
4143
base_url=agent_url,
4244
),
43-
tts=elevenlabs.TTS(),
45+
tts=elevenlabs.TTS(
46+
voice=elevenlabs.tts.Voice(
47+
id="UgBBYS2sOqTuMpoF3BR0",
48+
name="Mark",
49+
category="premade",
50+
settings=elevenlabs.tts.VoiceSettings(
51+
stability=0,
52+
similarity_boost=0,
53+
style=1,
54+
speed=1.01,
55+
use_speaker_boost=False
56+
),
57+
),
58+
),
4459
turn_detector=turn_detector.EOUModel(),
4560
)
4661
except Exception as e:

0 commit comments

Comments
 (0)