Description
Description
I'm using the ElevenLabs Python SDK and trying to run a conversation session using the Conversation class.
When I call conversation.start_session(), I get this error:
Code example
import os
import signal
from elevenlabs.client import ElevenLabs
from elevenlabs.conversational_ai.conversation import Conversation
from elevenlabs.conversational_ai.default_audio_interface import DefaultAudioInterface
agent_id = os.getenv("GWbk14ep0uXo9VkoaaK4")
api_key = os.getenv("sk_e23")
client = ElevenLabs(api_key=api_key)
conversation = Conversation(
API client and agent ID.
client,
agent_id,
# Assume auth is required when API_KEY is set.
requires_auth=bool(api_key),
# Use the default audio interface.
audio_interface=DefaultAudioInterface(),
# Simple callbacks that print the conversation to the console.
callback_agent_response=lambda response: print(f"Agent: {response}"),
callback_agent_response_correction=lambda original, corrected: print(f"Agent: {original} -> {corrected}"),
callback_user_transcript=lambda transcript: print(f"User: {transcript}"),
# Uncomment if you want to see latency measurements.
# callback_latency_measurement=lambda latency: print(f"Latency: {latency}ms"),
)
#conversation.start_session()
print("DEBUG: client =", client)
print("DEBUG: client._client_wrapper =", client._client_wrapper)
print("DEBUG: dir(client._client_wrapper) =", dir(client._client_wrapper))
Try to print _base_url if it exists
if hasattr(client._client_wrapper, "_base_url"):
print("DEBUG: _base_url =", client._client_wrapper._base_url)
else:
print("DEBUG: _base_url does NOT exist!")
Additional context
No response