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

    Interface SayAsOptions

    Configuration options for say-as elements.

    Controls interpretation and pronunciation of formatted text like dates, numbers, currency, and other specialized content.

    // Date interpretation
    const date: SayAsOptions = {
    interpretAs: 'date',
    format: 'ymd' // Year-month-day
    };

    // Currency with detail
    const currency: SayAsOptions = {
    interpretAs: 'currency',
    detail: 'USD'
    };
    interface SayAsOptions {
        detail?: string;
        format?: string;
        interpretAs: SayAsInterpretAs;
    }
    Index

    Properties

    detail?: string

    Additional detail for interpretation.

    Provides extra context for certain interpretAs types:

    • For currency: ISO currency code (USD, EUR, GBP, etc.)
    • For other types: Additional pronunciation hints
    "USD" - US Dollars
    
    "EUR" - Euros
    
    "JPY" - Japanese Yen
    
    format?: string

    Format hint for interpretation.

    Provides additional formatting information. Available formats depend on interpretAs value:

    For dates:

    • "mdy": Month-day-year
    • "dmy": Day-month-year
    • "ymd": Year-month-day
    • "md": Month-day
    • "dm": Day-month
    • "ym": Year-month
    • "my": Month-year
    • "d": Day only
    • "m": Month only
    • "y": Year only

    For time:

    • "hms12": 12-hour format with seconds
    • "hms24": 24-hour format with seconds
    "ymd" - For date: 2025-12-31
    
    "hms24" - For time: 14:30:00
    
    interpretAs: SayAsInterpretAs

    How to interpret the text content. (Required)

    Determines the pronunciation rules applied to the text. Each type has specific formatting requirements.

    "date" - For dates
    
    "cardinal" - For numbers
    
    "telephone" - For phone numbers
    
    "currency" - For money
    

    SayAsInterpretAs type for full list