TTS Websocket

Prev Next

Text To Speech Websocket Integration Node

Parameters

name
description
default
Address Address of the SESTEK TTS service http://core-tts
IgnoreSslErrors Ignores SSL certificate validation errors (applies to both https and wss) false
ConnectionTimeoutMsec Timeout for establishing the WebSocket connection 10000
Language Used at startup to determine which voice to select from the Voices list -
Credential Id of the credential that will be used for TTS requests. This parameter is only necessary if a cloud TTS deployment is used. You must leave this empty for on-premise deployments None(On-Prem)
Voices The list of available voices -
Volume Controls the output loudness of the synthesized speech. Accepts values between 0.0 (muted) and 2.0 1.0
Rate Controls the playback speed of the synthesized speech. Accepts values between 0.33 (slower) and 3.0 (faster). 1.0
Force Synthesis On Every Text If true, tts will try to synthesize a TTS sound on every "Text". false

Inputs

Audio

none

Events

name description known nodes that generate this event
Every Event that Contains the Data.Text field A TTS Synthesis audio can be generated from any event that is text based. Users can also generate their custom event that has Data.Text and send it through the Entry, or External Relay nodes. SR Http, SR WebSocket, Translate

Outputs

Audio

 Synthesized speech is sent to output
 Audio format is 16-bit PCM at the project’s audio sample rate.
 Audio is sent without a WAV header; downstream nodes should respect the HasWaveHeader = false flag

Events

name description
Start of TTS Fragment Sent just before a TTS audio fragment is written to the Audio output. Contains metadata about the fragment. This event includes Data.HasWaveHeader = false .
End of TTS Fragment Sent just after a TTS fragment has been fully written to the Audio output.

Remarks

Custom TTS Event

A sample tts-request event would look as follows.

{
    "Event": {
        "Name": "Custom TTS Event",
        "Data" : {
            "Text": "hello world"
        }
    }
}

Data.Text: The text that will be synthesized.

Sending Custom Events to Projects

To learn more about sending Events to projects, you can check the HTTP and External Relay pages.

Project Structure

A minimum viable TTS websocket project can be built as such:

Image

Supported flow types

Stream, Batch

Release Notes

v4.8.0
  • Added volume and rate support.
  • Added force synthesis on each text option.
v4.6.0
  • Introduced node.