Skip to content

Updating Python Twilio Example #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async def llm_talk(function_input: LlmTalkInput) -> str:
]

response = client.chat.completions.create(
model="gpt-3.5-turbo",
model="gpt-4.1-mini",
messages=messages_dicts,
stream=function_input.stream,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.venv
.env
uv.lock
inbound_trunk.json
inbound_trunk.json
dispatch_rule.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"livekit-agents>=0.12.15",
"livekit-agents==0.12.20",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Livekit released 1.0, so the latest version of V0 is specified instead to prevent breaking changes

"livekit-plugins-deepgram>=0.6.19",
"livekit-plugins-elevenlabs>=0.7.13",
"livekit-plugins-openai>=0.11.0",
Expand Down
15 changes: 1 addition & 14 deletions agent_telephony/twilio_livekit/livekit_pipeline/src/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,7 @@ def create_livekit_pipeline(
api_key=f"{agent_id}-livekit",
base_url=agent_url,
),
tts=elevenlabs.TTS(
voice=elevenlabs.tts.Voice(
id="UgBBYS2sOqTuMpoF3BR0",
name="Mark",
category="premade",
settings=elevenlabs.tts.VoiceSettings(
stability=0,
similarity_boost=0,
style=0,
speed=1.01,
use_speaker_boost=False
),
),
),
tts=elevenlabs.TTS(),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caused an error for me - swapped to generic TTS integration

turn_detector=turn_detector.EOUModel(),
)
except Exception as e:
Expand Down