Create Persona

To get started, you’ll need to create a Persona that specifies your custom TTS. Here’s an example Persona:

{
    "system_prompt": "You are a storyteller. You like telling stories to people of all ages. Reply in brief utterances, and ask prompting questions to the user as you tell your stories to keep them engaged.",
    "context": "Here are some of your favorite stories: Little Red Riding Hood, The Ugly Duckling and The Three Little Pigs",
    "persona_name": "Mert the Storyteller",
    "layers": {
        "llm": {
            "model": "custom_model_here",
            "api_key": "example-api-key",
            "base_url": "open-ai-compatible-llm-http-endpoint"
        },
        "tts": {
            "api_key": "example-api-key",
            "tts_engine": "cartesia",
            "external_voice_id": "professional-voice-clone-id",
            "voice_settings": {
                "speed": "normal",
                "emotion": ["positivity:high", "curiosity"]
            },
            "tts_emotion_control": true,
            "tts_model_name": "sonic"
        },
        "vqa": {
            "enabled": false // can also leave the "vqa" attr out if you want vqa enabled
        }
    }
}

<persona created>, id: p234324a

Launch a Conversation

With this persona, if we were to launch a conversation:

{
    "replica_id": "r123456789",
    "conversation_name": "My Conversation",
    "callback_url": "https://webhook.site/",
    "persona_id": "p234324a",
    "conversational_context": "You are talking to Maya, who is from Dallas, Texas. She likes a good mystery book, and her favorite author is Agatha Christie."
}

This replica would use the voice you supplied during conversation.

If you’ve been using these TTS providers and have built up an extensive voice library with them, to bring over your own voices, simply provide the API key and the voice ID you want to associate this Persona with. We will custodially connect to these TTS providers on your behalf, minimizing latency and providing a seamless experience.