UNPKG

@vonage/voice

Version:

The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.

61 lines 2.18 kB
import { NCCOActions, TTSLanguages } from '../../enums'; import { TalkAction } from '../../types'; import { Serializable } from '../../ncco'; /** * Represents a Talk action in a Nexmo Call Control Object (NCCO). * * This action allows the text-to-speech (TTS) synthesis of spoken words in the call. */ export declare class Talk implements TalkAction, Serializable { /** * The action type for this NCCO action. */ action: NCCOActions.TALK; /** * The text to be spoken during the call. */ text: string; /** * Indicates whether the talk action allows barge-in (optional). */ bargeIn?: boolean; /** * The number of times to loop the speech (optional). */ loop?: number; /** * The audio level at which to play the speech (optional). */ level?: string; /** * The language for the text-to-speech synthesis (optional). */ language?: TTSLanguages | string; /** * The speech style (optional). */ style?: string; /** * Indicates whether to use premium text-to-speech (optional). */ premium?: boolean; /** * Creates a new Talk action. * * @param {string} text - The text to be spoken during the call. * @param {boolean} [bargeIn] - Indicates whether the talk action allows barge-in (optional). * @param {number} [loop] - The number of times to loop the speech (optional). * @param {string} [level] - The audio level at which to play the speech (optional). * @param {TTSLanguages | string} [language] - The language for the text-to-speech synthesis (optional). * @param {string} [style] - The speech style (optional). * @param {boolean} [premium] - Indicates whether to use premium text-to-speech (optional). */ constructor(text: string, bargeIn?: boolean, loop?: number, level?: string, language?: TTSLanguages | string, style?: string, premium?: boolean); /** * Serializes the Talk action to a Nexmo Call Control Object (NCCO). * * @return {TalkAction} - The serialized Talk action. */ serializeToNCCO(): TalkAction; } //# sourceMappingURL=Talk.d.ts.map