VoiceBooker

Speech Control

Speech control functions let the AI assistant adjust the speed and volume of its spoken responses during a call. They do not take any parameters and apply to subsequent speech generated by the assistant.

Available Functions

FunctionDescription
incSpeed()Increases the speaking rate by 0.25, up to a maximum rate of 2.0.
decSpeed()Decreases the speaking rate by 0.25, down to a minimum rate of 0.25.
incVolume()Increases the volume gain by 6 dB, up to a maximum of +16 dB.
decVolume()Decreases the volume gain by 6 dB, down to a minimum of -96 dB.

The default speaking rate is 1.0 and the default volume gain is 0 dB. Repeated calls continue to adjust the current value, but never exceed the limits above.

Usage

Add a function in the tools section and describe when the assistant should use it. For example, define a function that calls incSpeed() when the caller asks the assistant to speak faster.

The functions can also be called from any JavaScript code snippet:

function speakFaster(params) {
    incSpeed();
    return { ...params, data: "" };
}

function speakLouder(params) {
    incVolume();
    return { ...params, data: "" };
}

On this page