Interface AzureSpeechTTSProviderConfig

Configuration for the AzureSpeechTTSProvider.

interface AzureSpeechTTSProviderConfig {
    key: string;
    region: string;
    defaultVoice?: string;
    fetchImpl?: {
        (input, init?): Promise<Response>;
        (input, init?): Promise<Response>;
    };
}

Properties

key: string

Azure Cognitive Services subscription key. Sent as the Ocp-Apim-Subscription-Key header value.

See AzureSpeechSTTProviderConfig.key for the same pattern on STT.

region: string

Azure region where the Speech resource is deployed, e.g. 'eastus', 'westeurope', 'southeastasia'.

The region determines the REST endpoint hostname: https://{region}.tts.speech.microsoft.com

defaultVoice?: string

Default voice name to use when none is specified per-request. Must be a valid Azure voice short-name (e.g. 'en-US-JennyNeural').

fetchImpl?: {
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
}

Custom fetch implementation for dependency injection in tests.

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

    • (input, init?): Promise<Response>
    • Parameters

      • input: string | Request | URL
      • Optional init: RequestInit

      Returns Promise<Response>

Default

globalThis.fetch