Overriding TTS Parameters in VoiceXML using CCXML

Blueworx Voice Response can override Text-To-Speech parameters when starting a dialog

Setting TTS parameters

We currently only support setting TTS parameters for Google TTS and Eleven Labs TTS. The parameters must be inside a google or elevenlabs object respectively in the hints supplied to a <dialogstart>. The following parameters are supported for google:

voice_name Google voice name
gender Gender of the voice and can be either "male" or "female". This is overridden by directly setting the voice_name.
pitch The pitch of the audio (in semitones) in a range of -20.0 to 20.0. This default is 0.0.
speakingRate The speaking rate of the generated audio in the range of 0.25 to 4.0. The default is 1.0 which is normal speaking rate. Higher numbers speed up the rate, lower numbers slow down the rate.
volumeGain The volume gain of the audio (in dB) in the range of -96.0 to 16.0. The default is 0.0. Setting the value to 6.0 will double the volume and -6.0 will halve the volume.
            
<!-- Create the hints object -->
<var name="hints" expr="new Object()"/>
<!-- Create the tts_params object that will contain all TTS params -->
<var name="tts_params_obj" expr="new Object()"/>
<!-- Create the google object that will contain all Google TTS specific params -->
<var name="google_obj" expr="new Object()"/>
<!-- Setup some custom google variables -->
<assign name="google_obj.my_variable" expr="'some value'"/>
<assign name="google_obj.my_other_variable" expr="'some other value'"/>
<assign name="google_obj.my_number_variable" expr="9"/>
<assign name="google_obj.my_boolean_variable" expr="true"/>
<!-- Set the Google TTS parameters to the TTS object -->
<assign name="tts_params_obj.google" expr="google_obj"/>
<!-- Set the TTS params object to the hints object -->
<assign name="hints.google" expr="tts_params_obj"/>

<!-- Now supply these hints when starting the dialog. If your dialog uses a TTS vendor other than Google TTS then these will be ignored -->
<dialogstart src="your_voicexml_url" type="'application/voicexml+xml'" connectionid="evt.connectionid" hints="hints"/> 
         

These are the currently supported override parameters for Eleven Labs. They correspond to those set in the call feature, see Parameters for TTS_ELEVEN_LABS Call Feature

voice_id Set this if you want to override the Voice ID that was set in the call feature
model_id Set this if you want to override the Model ID that was set in the call feature
optimize_streaming_latency Set this if you want to override the Optimize Streaming Latency value that was set in the call feature, as an integer 0-4 inclusive
voice_settings An object that can contain any number of the following four values: style, stability, similarity_boost, use_speaker_boost. These override the corresponding Voice settings in the call feature - if you only want to override a subset of these then only set those you want to override.

These values can be supplied on a dialogstart's hint object that uses an Eleven Labs call feature as follows:

<var name="hints" expr="{tts_parms:{elevenlabs:{voice_id:'D38z5RcWu1voky8WS1ja', model_id:'eleven_multilingual_v1', optimize_streaming_latency:1, voice_settings:{style:0.5,stability:0.5,similarity_boost:0.5,use_speaker_boost:true}}}}"/>
<dialogstart src="'yourVXMLFileHere.vxml'" type="'application/voicexml+xml'" connectionid="event$.connectionid" hints="hints"/>