Skip to content

TextToSpeech

Outgoing Messages

PrepareSpeechFailed

Notifies the platform implementation about a failed speech synthesis.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "TextToSpeech",
            "action": "PrepareSpeechFailed"
        }
    },
    "payload": {
        "speechId": {{String}},
        "reason": {{String}}        
    }
}

Payload

Property Type Required Description Example
speechId String Yes The speech ID.
reason String Yes The failure reason.

PrepareSpeechCompleted

Notifies the platform implementation about a successful speech synthesis.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "TextToSpeech",
            "action": "PrepareSpeechCompleted"
        }
    },
    "payload": {
        "speechId": {{String}},
        "token": {{String}},
        "source": "STREAM",
        "streamId": {{String}},
        "encoding": {{AudioStreamEncoding}},
        "properties": {{dict}},
        "metadata": {{String}}        
    }
}

Payload

Property Type Required Description Example
speechId String Yes The speech ID.
token String Yes A unique token for this audio stream.
source String Yes source description.
streamId String Yes The URL audio stream being provided.
encoding AudioStreamEncoding Yes The stream encoding format if known.
properties dict Yes List of properties associated with the audio stream.
metadata String Yes The metadata associated with the speech resource.

GetCapabilitiesReply

Reply for GetCapabilities message.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Reply",
        "id": {{String}},
        "messageDescription": {
            "topic": "TextToSpeech",
            "action": "GetCapabilities",
            "replyToId": {{String}}        
        }
    },
    "payload": {
        "capabilities": {{String}}        
    }
}

Payload

Property Type Required Description Example
capabilities String Yes The capabilities of the Text to Speech provider.

Incoming Messages

PrepareSpeech

Prepare Speech from a text/SSML input.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "TextToSpeech",
            "action": "PrepareSpeech"
        }
    },
    "payload": {
        "speechId": {{String}},
        "text": {{String}},
        "provider": {{String}},
        "options": {{String}}        
    }
}

Payload

Property Type Required Description Example
speechId String Yes The speech ID.
text String Yes The text/SSML to be used for speech synthesis.
provider String Yes The text to speech provider to be used for speech synthesis.
options String No The options to be used for speech synthesis.

GetCapabilities

Get Capabilities of a Text to Speech provider.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "TextToSpeech",
            "action": "GetCapabilities"
        }
    },
    "payload": {
        "provider": {{String}}        
    }
}

Payload

Property Type Required Description Example
provider String Yes The provider string. Use text-to-speech-provider here.