SSML Builder Documentation - v1.0.1
    Preparing search index...

    Interface ProsodyOptions

    Configuration options for prosody (speech characteristics).

    Controls various aspects of speech delivery including pitch, speaking rate, volume, and intonation contours. Multiple properties can be combined for complex speech modifications.

    // Slow, quiet speech
    const whisper: ProsodyOptions = {
    rate: 'slow',
    volume: 'soft',
    pitch: 'low'
    };

    // Excited speech
    const excited: ProsodyOptions = {
    rate: '1.2', // 20% faster
    pitch: '+10%', // 10% higher
    volume: 'loud'
    };
    interface ProsodyOptions {
        contour?: string;
        pitch?: string;
        range?: string;
        rate?: string;
        volume?: string;
    }
    Index

    Properties

    contour?: string

    Pitch contour changes over time.

    Defines how pitch changes during speech using time-position pairs. Format: "(time1,pitch1) (time2,pitch2) ..." Time as percentage, pitch as Hz or percentage change.

    "(0%,+5Hz) (50%,+10Hz) (100%,+5Hz)" - Rising intonation
    
    "(0%,+20Hz) (100%,-10Hz)" - Falling intonation
    
    pitch?: string

    Pitch adjustment for the speech.

    Can be specified as:

    • Absolute frequency: "200Hz", "150Hz"
    • Relative change: "+2st" (semitones), "+10%", "-5%"
    • Named values: "x-low", "low", "medium", "high", "x-high"
    "high" - High pitch
    
    "+10%" - 10% higher
    
    "200Hz" - Specific frequency
    
    "-2st" - 2 semitones lower
    
    range?: string

    Pitch range variation.

    Controls the variability of pitch (monotone vs expressive). Can be relative change or named value.

    "x-low" - Very monotone
    
    "high" - Very expressive
    
    "+10%" - 10% more variation
    
    rate?: string

    Speaking rate/speed.

    Can be specified as:

    • Multiplier: "0.5" (half speed), "2.0" (double speed)
    • Percentage: "+10%", "-20%"
    • Named values: "x-slow", "slow", "medium", "fast", "x-fast"
    "slow" - Slow speech
    
    "1.5" - 50% faster
    
    "+25%" - 25% faster
    
    volume?: string

    Volume level of the speech.

    Can be specified as:

    • Numeric: "0" to "100" (0=silent, 100=loudest)
    • Percentage: "50%", "80%"
    • Decibels: "+10dB", "-5dB"
    • Named values: "silent", "x-soft", "soft", "medium", "loud", "x-loud"
    "soft" - Quiet speech
    
    "loud" - Loud speech
    
    "50" - 50% volume
    
    "+5dB" - 5 decibels louder