VoiceSynth
- Last UpdatedApr 29, 2026
- 4 minute read
The VoiceSynth node provides voice synthesizer function. Based on the Windows voice synthesizer, it can use all the registered available voices. The VoiceSynth node provides text to speech (TTS) functionalities by converting text into spoken audio using the system’s installed speech engines.
-
It supports both plain text and SSML version 1.0 snippets.
-
When there's no support for VoiceSynth in the system the isVoiceAvailable field is set to false and all voice selection or speak requests are ignored by the node.
Note: This node supports only SAPI-based (Microsoft Speech API) voices that are registered in the classic Windows speech registry. It does not support Windows 11 Narrator Natural Voices. Voices management is performed through Windows operating system.
Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Configuration parameters
The configuration settings can work in different languages, but depends on registered languages.
VoiceSynth elements
The configuration is made up of four elements.
|
Element |
Description |
|---|---|
|
Voice gender |
NotSet, Male, Female, Neutral |
|
Voice age |
NotSet, Adult, Child, Senior, Teen |
|
ID |
Not used |
|
Culture |
Select between English (en) or other languages, such as Italian (it) or French (fr). |
Code example
This is an example of the VoiceSynth node.
<VoiceSynth name="voice" configuration="NotSet,NotSet,0,it"/>
Selecting a voice
The node offers two ways to select a node: direct selection and search-based selection.
Direct selection
The VoiceSynth node exposes an sfunction named selectVoice through which it's possible to set a specific voice (if available). It's possible to use the getVoicesList sfunction to list all installed compatible voices available on the system. The field selectedVoice is internally valorized.
Search based selection
The search-based approach allows you to setup search parameters and get the voice that better matches the requirements from those available.
The field to define the search criteria is configuration. It accepts a comma separated list of search parameters following below instructions:
Gender,Age,Index,Culture > example: Female,Teen,0,fr
-
Gender: Can be set to any value among: NotSet, Male, Female, Neutral
-
Age: Can be set to any value among: NotSet, Child, Teen, Adult, Senior
-
Index: Can be set to an integer value from 0 onwards representing the position in the list result (use 0 to get the best match, 1 to get the second and so on)
-
Culture: Indicates the desired language. It supports both two letter codes such as "en" and four letter codes such as "en-US".
All parameters must be set and the result heavily depends on installed voices available. This means that you could get a male voice instead of a female one in some cases.
Speak
The node offers two ways to speak: plain text and SSML.
Plain text
Set a textual content to the speak field to have the selectedVoice read it. You can adjust the speakingRate and volume, but only when the voice is not speaking.
SSML
The VoiceSynth node supports SSML 1.0 specification (check Speech Synthesis Markup Language (SSML) Version 1.0 — W3C Recommendation (2004)).
Instead of using the speak field, consume speakSSML instead.
Note: The SSML XML must be complete indicating mandatorily both the version and the xml:lang attributes.
This is an example of valid SSML.
<speak version="1.0"
xmlns="http://www.w3.org/2001/10/synthesis"
xml:lang="en-US">
I am <emphasis level="strong">so</emphasis> excited.
<prosody rate="fast">I speak very quickly.</prosody>
<prosody pitch="-2st">I speak with a lower pitch.</prosody>
</speak>
VoiceSynth fields
These are the fields for VoiceSynth node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > VoiceSynth
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
configuration |
sstring |
Optional |
NotSet,NotSet,0,en |
Allows you to select a voice using search criteria. The value must contain all attributes: Gender,Age,Index,Culture. |
|
getVoicesList |
sfunction |
Optional |
MSTRING getVoicesList() Returns the list of available voices. |
|
|
isSpeaking |
sbool |
Internally calculated |
Becomes true when the voice is speaking. |
|
|
isVoiceAvailable |
sbool |
Internally calculated |
Sets to true when the system supports VoiceSynth node use. |
|
|
selectedVoice |
sstring |
Internally calculated |
Currently selected voice. |
|
|
setVoiceByName |
sfunction |
Optional |
SSTRING setVoiceByName(SSTRING Voice) Allow to assign directly a voice if available. |
|
|
speak |
sstring |
Optional |
Allows reading a plain text. |
|
|
speakingRate |
sint |
Optional |
0 |
Used to change the speed of the voice. If used while isSpeaking is true it resets the reading. Values can be in -10 10 range. |
|
speakSSML |
sstring |
Allows reading SSML content. |
||
|
volume |
sfloat |
Optional |
1 |
Allows changing the voice volume. If used while isSpeaking is true, it resets the reading. |

