Skip to content

[Conversational AI] Chat-Only setup still needs AudioInterface defined for Conversation class #632

@varun-d

Description

@varun-d

Description

Steps to reproduce

Following the documentation for Chat Mode, for chat-mode.

As per documentation, we use:

# ... imports
client = ElevenLabs(api_key=API_KEY)
config = ConversationInitiationData(
    conversation_config_override={"conversation": {"text_only": True}},
)

# setup conversation module
conversation = Conversation(
    elevenlabs,
    agent_id,
    requires_auth=bool(api_key),
    config=config, # and so on...

Expected Behavior

Be able to run chat-mode mode with the conversation instance.

Actual Behavior

  1. Error on Conversation class -> missing audio_interface param.
  2. I check the SDK, it is NOT set as optional.
#In file /elevenlabs/conversational_ai/conversation.py line:465
class Conversation(BaseConversation):
    audio_interface: AudioInterface # NOT OPTIONAL!
    callback_agent_response: Optional[Callable[[str], None]]
    callback_agent_response_correction: Optional[Callable[[str, str], None]]
    callback_user_transcript: Optional[Callable[[str], None]]

Quick Temporary Fix
Create a dummy audio_interface or a mock audio interface as per SDK tests:

from elevenlabs.conversational_ai.default_audio_interface import DefaultAudioInterface

class DummyAudioInterface(DefaultAudioInterface):
    pass

With a dummy audio interface, chat-mode override works fine.

Code example

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions