SAGEA Logo
SAGEABeta
Voice

Emotion Control

Emotion Control

VORA's advanced emotion control system enables real-time emotional expression and dynamic tone adjustment, creating natural, lifelike voice interactions that adapt to context and user needs.

๐ŸŽญ

Real-time Emotion Shifting

Dynamically adjust emotional expression during synthesis for natural, contextually appropriate voice interactions.

Emotion System Overview

VORA's emotion control operates on multiple dimensions:

  • Primary Emotions: Basic emotional states (happy, sad, angry, fearful, surprised, disgusted)
  • Emotional Intensity: Control the strength of emotional expression (0.0 - 1.0)
  • Contextual Blend: Mix multiple emotions for complex expressions
  • Dynamic Transitions: Smooth emotion changes within single utterances

Quick Start

import sagea
 
client = sagea.VoraClient(api_key="your-api-key")
 
# Basic emotion control
audio = client.synthesize(
    text="I'm so excited to help you today!",
    model="vora-v1",
    emotion="excited",
    emotion_intensity=0.8
)
 
# Complex emotional expression
audio = client.synthesize(
    text="I understand this might be frustrating, but I'm here to help.",
    model="vora-v1",
    emotion_blend={
        "empathetic": 0.7,
        "calm": 0.5,
        "professional": 0.3
    }
)

Available Emotions

Primary Emotions

๐Ÿ˜Š
Happy
joy, excitement, cheerful
๐Ÿ˜ข
Sad
melancholy, disappointed
๐Ÿ˜ 
Angry
frustrated, irritated
๐Ÿ˜จ
Fearful
anxious, worried
๐Ÿ˜ฒ
Surprised
amazed, shocked
๐Ÿคข
Disgusted
repulsed, displeased
๐Ÿ˜
Neutral
calm, balanced
๐Ÿค”
Thoughtful
contemplative, curious

Contextual Emotions

Beyond basic emotions, VORA supports contextual emotional states:

# Professional contexts
professional_emotions = [
    "professional", "authoritative", "confident", 
    "reassuring", "diplomatic", "persuasive"
]
 
# Social contexts  
social_emotions = [
    "friendly", "warm", "welcoming", "conversational",
    "enthusiastic", "supportive", "encouraging"
]
 
# Narrative contexts
narrative_emotions = [
    "mysterious", "dramatic", "suspenseful", "romantic",
    "heroic", "whimsical", "ominous", "peaceful"
]

Emotion Intensity Control

Fine-tune emotional expression strength:

# Subtle emotion (0.2-0.4)
subtle_happy = client.synthesize(
    text="That's nice to hear.",
    emotion="happy",
    emotion_intensity=0.3
)
 
# Moderate emotion (0.5-0.7)
moderate_excited = client.synthesize(
    text="I'm really looking forward to this!",
    emotion="excited", 
    emotion_intensity=0.6
)
 
# Strong emotion (0.8-1.0)
strong_enthusiasm = client.synthesize(
    text="This is absolutely amazing!",
    emotion="excited",
    emotion_intensity=0.9
)

Emotion Blending

Create complex emotional expressions by blending multiple emotions:

# Customer service scenario
customer_response = client.synthesize(
    text="I sincerely apologize for the inconvenience you've experienced.",
    emotion_blend={
        "apologetic": 0.8,
        "professional": 0.6,
        "empathetic": 0.7,
        "concerned": 0.4
    }
)
 
# Storytelling scenario
narrator_voice = client.synthesize(
    text="As the storm approached, she felt a mixture of fear and excitement.",
    emotion_blend={
        "mysterious": 0.6,
        "dramatic": 0.7,
        "suspenseful": 0.5,
        "narrative": 0.8
    }
)

Dynamic Emotion Transitions

Change emotions within a single utterance:

# Emotion markers in text
transition_text = """
<emotion:neutral>Good morning, this is Sarah from customer support.</emotion>
<emotion:concerned>I understand you're having an issue with your account.</emotion>
<emotion:reassuring>Don't worry, I'm here to help you resolve this quickly.</emotion>
<emotion:professional>Let me pull up your account details right now.</emotion>
"""
 
audio = client.synthesize(
    text=transition_text,
    model="vora-v1",
    enable_emotion_transitions=True
)

Smooth Transitions

Configure transition smoothness:

# Gradual emotion transitions
audio = client.synthesize(
    text="I started feeling worried, but then became hopeful.",
    emotion_sequence=[
        {"emotion": "worried", "start": 0, "end": 0.4},
        {"emotion": "transitional", "start": 0.4, "end": 0.6}, 
        {"emotion": "hopeful", "start": 0.6, "end": 1.0}
    ],
    transition_smoothness=0.8
)

Contextual Emotion Adaptation

VORA can automatically adapt emotions based on context:

# Context-aware emotion selection
contextual_audio = client.synthesize(
    text="Thank you for your patience during this process.",
    context={
        "scenario": "customer_service",
        "customer_mood": "frustrated", 
        "interaction_stage": "resolution",
        "urgency": "medium"
    },
    auto_emotion=True
)
 
# The system automatically selects appropriate emotions:
# - "empathetic" (0.7) for customer frustration
# - "professional" (0.8) for service context
# - "reassuring" (0.6) for resolution stage

Advanced Emotion Features

Emotion Memory

Maintain emotional context across conversation:

# Initialize conversation with emotion memory
conversation = client.start_conversation(
    emotion_memory=True,
    personality_profile="helpful_assistant"
)
 
# Emotions evolve based on conversation flow
response1 = conversation.synthesize(
    text="Hi there! How can I help you today?",
    emotion="friendly"
)
 
response2 = conversation.synthesize(
    text="Oh no, that sounds really frustrating.",
    # Automatically becomes more empathetic based on context
)
 
response3 = conversation.synthesize(
    text="Great! I'm so glad we could solve that together.",
    # Naturally transitions to satisfaction/accomplishment
)

Personality Consistency

Define consistent personality traits:

# Create personality profile
personality = {
    "base_emotion": "professional",
    "warmth_level": 0.7,
    "energy_level": 0.6,
    "empathy_factor": 0.8,
    "confidence_level": 0.9,
    "traits": ["patient", "helpful", "knowledgeable"]
}
 
# All synthesis maintains personality consistency
audio = client.synthesize(
    text="Let me walk you through this step by step.",
    personality=personality,
    adapt_to_content=True
)

Emotion Control in Different Languages

Emotions adapt to cultural contexts:

# English - direct emotional expression
english_audio = client.synthesize(
    text="I'm really excited about this opportunity!",
    language="en-US",
    emotion="excited",
    cultural_adaptation=True
)
 
# Japanese - more subdued emotional expression
japanese_audio = client.synthesize(
    text="ใ“ใฎๆฉŸไผšใ‚’ใจใฆใ‚‚ๆฅฝใ—ใฟใซใ—ใฆใ„ใพใ™ใ€‚",
    language="ja-JP", 
    emotion="excited",
    cultural_adaptation=True  # Automatically moderates intensity
)
 
# Spanish - warmer emotional expression
spanish_audio = client.synthesize(
    text="ยกEstoy muy emocionado por esta oportunidad!",
    language="es-ES",
    emotion="excited", 
    cultural_adaptation=True  # Enhances warmth
)

Use Cases

Customer Service

# Adaptive customer service responses
def handle_customer_inquiry(customer_message, customer_mood):
    if customer_mood == "frustrated":
        emotion_config = {
            "empathetic": 0.8,
            "professional": 0.7,
            "calm": 0.6
        }
    elif customer_mood == "confused":
        emotion_config = {
            "patient": 0.8,
            "helpful": 0.7,
            "reassuring": 0.5
        }
    else:
        emotion_config = {
            "friendly": 0.7,
            "professional": 0.6
        }
    
    return client.synthesize(
        text=generate_response(customer_message),
        emotion_blend=emotion_config
    )

Interactive Storytelling

# Dynamic story narration
def narrate_story_section(text, story_context):
    emotion_map = {
        "action": {"dramatic": 0.8, "energetic": 0.7},
        "romance": {"warm": 0.8, "gentle": 0.6},
        "mystery": {"mysterious": 0.9, "suspenseful": 0.7},
        "comedy": {"playful": 0.8, "cheerful": 0.6}
    }
    
    return client.synthesize(
        text=text,
        emotion_blend=emotion_map.get(story_context["genre"], {"neutral": 0.5}),
        narrative_style=True
    )

Educational Content

# Adaptive educational delivery
def create_lesson_audio(content, difficulty_level, student_progress):
    if student_progress == "struggling":
        emotions = {"encouraging": 0.8, "patient": 0.7, "supportive": 0.6}
    elif student_progress == "advanced":
        emotions = {"enthusiastic": 0.7, "confident": 0.6}
    else:
        emotions = {"friendly": 0.6, "professional": 0.5}
    
    return client.synthesize(
        text=content,
        emotion_blend=emotions,
        speaking_rate=0.9 if difficulty_level == "complex" else 1.0
    )

Real-time Emotion Control

For live applications requiring dynamic emotion adjustment:

# Real-time emotion streaming
async def real_time_emotion_synthesis():
    stream = await client.create_emotion_stream(
        model="vora-l1",  # Low-latency model
        emotion_adaptation=True
    )
    
    # Emotion changes in real-time based on input
    await stream.synthesize(
        "Hello, welcome to our service.",
        emotion="friendly"
    )
    
    # Dynamically adjust based on user response
    user_sentiment = analyze_user_input(user_response)
    
    if user_sentiment == "negative":
        await stream.adjust_emotion({
            "empathetic": 0.8,
            "concerned": 0.6
        })
    
    await stream.synthesize(
        "I understand your concern, let me help with that.",
        maintain_emotional_context=True
    )

Best Practices

Emotion Selection Guidelines

  1. Match Context: Choose emotions appropriate for the situation
  2. Consider Audience: Adapt emotional intensity to your audience
  3. Maintain Consistency: Keep emotional tone consistent within interactions
  4. Cultural Sensitivity: Respect cultural norms around emotional expression

Performance Optimization

# Cache emotional profiles for consistent performance
emotion_cache = {
    "customer_service": {"professional": 0.8, "helpful": 0.7},
    "educational": {"encouraging": 0.6, "clear": 0.8},
    "entertainment": {"engaging": 0.9, "dynamic": 0.7}
}
 
# Preload frequently used emotion combinations
client.preload_emotions([
    "professional", "friendly", "empathetic", 
    "excited", "calm", "reassuring"
])

Next Steps

๐ŸŽญ Try Emotion Control

Experiment with emotions in our console

Open Console โ†’

๐Ÿ“š Advanced Features

Learn about real-time synthesis

Real-time Guide โ†’