tavus-cvi-persona

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Tavus CVI Persona Configuration

Tavus CVI 角色配置

Deep configuration of persona behavior, LLM, TTS, perception, and turn-taking.
对角色行为、LLM、TTS、感知功能和话轮转换进行深度配置。

Full Persona Schema

完整角色架构

bash
curl -X POST https://tavusapi.com/v2/personas \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "persona_name": "Technical Interviewer",
    "pipeline_mode": "full",
    "system_prompt": "You are a senior technical interviewer...",
    "context": "Focus on system design and coding problems.",
    "default_replica_id": "rfe12d8b9597",
    "layers": {
      "llm": {...},
      "tts": {...},
      "perception": {...},
      "stt": {...}
    }
  }'
bash
curl -X POST https://tavusapi.com/v2/personas \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "persona_name": "Technical Interviewer",
    "pipeline_mode": "full",
    "system_prompt": "You are a senior technical interviewer...",
    "context": "Focus on system design and coding problems.",
    "default_replica_id": "rfe12d8b9597",
    "layers": {
      "llm": {...},
      "tts": {...},
      "perception": {...},
      "stt": {...}
    }
  }'

LLM Layer

LLM 层

Built-in Models (Optimized)

内置优化模型

json
{
  "layers": {
    "llm": {
      "model": "tavus-gpt-4o"
    }
  }
}
Options:
tavus-gpt-4o
,
tavus-gpt-4o-mini
,
tavus-llama
json
{
  "layers": {
    "llm": {
      "model": "tavus-gpt-4o"
    }
  }
}
可选模型:
tavus-gpt-4o
,
tavus-gpt-4o-mini
,
tavus-llama

Bring Your Own LLM

接入自有LLM

Any OpenAI-compatible API:
json
{
  "layers": {
    "llm": {
      "model": "gpt-4-turbo",
      "base_url": "https://api.openai.com/v1",
      "api_key": "sk-...",
      "speculative_inference": true
    }
  }
}
Works with: OpenAI, Anthropic (via proxy), Groq, Together, local models with OpenAI-compatible endpoints.
任何兼容OpenAI的API:
json
{
  "layers": {
    "llm": {
      "model": "gpt-4-turbo",
      "base_url": "https://api.openai.com/v1",
      "api_key": "sk-...",
      "speculative_inference": true
    }
  }
}
支持的服务商:OpenAI、Anthropic(通过代理)、Groq、Together,以及提供OpenAI兼容端点的本地模型。

Function Calling / Tools

函数调用/工具

json
{
  "layers": {
    "llm": {
      "model": "tavus-gpt-4o",
      "tools": [
        {
          "type": "function",
          "function": {
            "name": "get_weather",
            "description": "Get current weather for a location",
            "parameters": {
              "type": "object",
              "properties": {
                "location": {
                  "type": "string",
                  "description": "City and state"
                }
              },
              "required": ["location"]
            }
          }
        }
      ]
    }
  }
}
Tool calls are sent via the Interactions Protocol.
json
{
  "layers": {
    "llm": {
      "model": "tavus-gpt-4o",
      "tools": [
        {
          "type": "function",
          "function": {
            "name": "get_weather",
            "description": "Get current weather for a location",
            "parameters": {
              "type": "object",
              "properties": {
                "location": {
                  "type": "string",
                  "description": "City and state"
                }
              },
              "required": ["location"]
            }
          }
        }
      ]
    }
  }
}
工具调用通过交互协议发送。

TTS Layer

TTS 层

Cartesia (Default)

Cartesia(默认)

json
{
  "layers": {
    "tts": {
      "tts_engine": "cartesia",
      "voice_id": "your-cartesia-voice-id"
    }
  }
}
json
{
  "layers": {
    "tts": {
      "tts_engine": "cartesia",
      "voice_id": "your-cartesia-voice-id"
    }
  }
}

ElevenLabs

ElevenLabs

json
{
  "layers": {
    "tts": {
      "tts_engine": "elevenlabs",
      "voice_id": "your-elevenlabs-voice-id",
      "api_key": "your-elevenlabs-key"
    }
  }
}
json
{
  "layers": {
    "tts": {
      "tts_engine": "elevenlabs",
      "voice_id": "your-elevenlabs-voice-id",
      "api_key": "your-elevenlabs-key"
    }
  }
}

PlayHT

PlayHT

json
{
  "layers": {
    "tts": {
      "tts_engine": "playht",
      "voice_id": "your-playht-voice-id",
      "api_key": "your-playht-key"
    }
  }
}
json
{
  "layers": {
    "tts": {
      "tts_engine": "playht",
      "voice_id": "your-playht-voice-id",
      "api_key": "your-playht-key"
    }
  }
}

Perception Layer (Raven)

感知层(Raven)

Enables the replica to "see" - analyzes expressions, gaze, background, screen content.
json
{
  "layers": {
    "perception": {
      "perception_model": "raven-0",
      "ambient_awareness": true
    }
  }
}
Use cases:
  • React to user expressions/emotions
  • See shared screens
  • Analyze user's environment
让数字分身具备“视觉”能力——可分析表情、视线、背景和屏幕内容。
json
{
  "layers": {
    "perception": {
      "perception_model": "raven-0",
      "ambient_awareness": true
    }
  }
}
适用场景:
  • 响应用户表情/情绪
  • 查看共享屏幕
  • 分析用户所处环境

STT Layer (Speech Recognition)

STT 层(语音识别)

Smart Turn Detection (Sparrow)

智能话轮检测(Sparrow)

json
{
  "layers": {
    "stt": {
      "smart_turn_detection": true,
      "participant_pause_sensitivity": "medium",
      "participant_interrupt_sensitivity": "medium"
    }
  }
}
Sensitivity options:
low
,
medium
,
high
  • pause_sensitivity: How long user pauses before replica responds
  • interrupt_sensitivity: How easily user can interrupt replica
json
{
  "layers": {
    "stt": {
      "smart_turn_detection": true,
      "participant_pause_sensitivity": "medium",
      "participant_interrupt_sensitivity": "medium"
    }
  }
}
灵敏度选项:
low
,
medium
,
high
  • pause_sensitivity:用户暂停多久后数字分身开始回应
  • interrupt_sensitivity:用户打断数字分身的难易程度

Pipeline Modes

流水线模式

Full (Default)

完整模式(默认)

Complete pipeline with all layers:
json
{ "pipeline_mode": "full" }
包含所有层的完整流水线:
json
{ "pipeline_mode": "full" }

Echo

回声模式

Bypass LLM - replica speaks exactly what you send:
json
{ "pipeline_mode": "echo" }
Use with Interactions Protocol to control speech directly.
绕过LLM——数字分身完全复述你发送的内容:
json
{ "pipeline_mode": "echo" }
可搭配交互协议直接控制语音输出。

Audio Only

仅音频模式

Voice-only, no video:
json
{
  "pipeline_mode": "full",
  "audio_only": true
}
仅语音输出,无视频:
json
{
  "pipeline_mode": "full",
  "audio_only": true
}

Update Existing Persona

更新现有角色

bash
curl -X PATCH https://tavusapi.com/v2/personas/{persona_id} \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "system_prompt": "Updated prompt...",
    "context": "New context..."
  }'
bash
curl -X PATCH https://tavusapi.com/v2/personas/{persona_id} \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "system_prompt": "Updated prompt...",
    "context": "New context..."
  }'

List & Delete Personas

列出与删除角色

bash
undefined
bash
undefined

List

列出角色

curl https://tavusapi.com/v2/personas -H "x-api-key: YOUR_API_KEY"
curl https://tavusapi.com/v2/personas -H "x-api-key: YOUR_API_KEY"

Delete

删除角色

curl -X DELETE https://tavusapi.com/v2/personas/{persona_id}
-H "x-api-key: YOUR_API_KEY"
undefined
curl -X DELETE https://tavusapi.com/v2/personas/{persona_id}
-H "x-api-key: YOUR_API_KEY"
undefined

Supported Languages

支持的语言

30+ languages via Cartesia + ElevenLabs fallback: English, French, German, Spanish, Portuguese, Chinese, Japanese, Hindi, Italian, Korean, Dutch, Polish, Russian, Swedish, Turkish, Indonesian, Filipino, Arabic, Czech, Greek, Finnish, Croatian, Danish, Tamil, Ukrainian, Hungarian, Norwegian, Vietnamese, and more.
通过Cartesia + ElevenLabs fallback支持30+种语言: 英语、法语、德语、西班牙语、葡萄牙语、中文、日语、印地语、意大利语、韩语、荷兰语、波兰语、俄语、瑞典语、土耳其语、印度尼西亚语、菲律宾语、阿拉伯语、捷克语、希腊语、芬兰语、克罗地亚语、丹麦语、泰米尔语、乌克兰语、匈牙利语、挪威语、越南语等。