Skip to navigation

changeVoice

View as MarkdownOpen in Claude

Change the AI’s voice for the rest of the call. Sends the change_voice action.

The new voice replaces the voice of the language currently in use, and may be on a different TTS engine. The platform applies it at the next batch of speech, never mid-utterance, and it then stays for that language for the rest of the call. If the new voice can’t be opened, the platform falls back to its fallback voice.

Parameters

voice
stringRequired

Voice spec in engine.voice:model form, the same form a language’s voice takes in addLanguage(), such as "elevenlabs.rachel". The engine. prefix and the :model suffix are optional. Throws an Error when the value is empty or only whitespace, which the platform would ignore.

Returns

FunctionResult — this, for chaining.

Example

import { FunctionResult } from '@signalwire/sdk';
const result = new FunctionResult('Tell the caller you are switching to a calmer voice.')
.changeVoice('elevenlabs.rachel');