TextToSpeech

Uses Google Text-to-Speech to synthesize voice from text or SSML. Voice is output to an mp3 file. File name is defined by the path attribute if it is not blank. In this case path is resolved relative to the containing action. If path attribute is blank then the file name is computed as a digest of the sound bytes.

Generates audio tag which plays the synthesized speech.

Use of text to speech requires GOOGLE_APPLICATION_CREDENTIALS environment variable to be set to the location of the private key JSON file. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

Supertypes

Subtypes

Members

Attributes

embed : EBoolean

If true, audio data is not stored to a file, but is embedded into the page using data: URI.

Type EBoolean
Cardinality 0..1

format : EString

Text format - Text or SSML.

Type EString
Cardinality 0..1

interpolate : EBoolean

If true, text/ssml is interpolated before speech generation.

Type EBoolean
Cardinality 0..1

language : EString

Language and locale code, e.g. en-US. If blank, then the contextual language and locale are used - hardcoded in the UI and configurable in the CLI. See Supported voices and languages for a list of locales and voices.

Type EString
Cardinality 0..1

path : EString

MP3 resource location (file name) relative to the containing action context URI. If this attribute is blank then the file name is computed as a digest of the sound bytes.

Type EString
Cardinality 0..1

voice : EString

Voice name, e.g. en-US-Wavenet-D. If blank, then the contextual voice is used - hardcoded in the UI and configurable in the CLI. See Supported voices and languages for a list of locales and voices.

Type EString
Cardinality 0..1

References

appearance : Appearance

Appearance to apply to the generated audio tag.

Type Appearance
Cardinality 0..1