VoxTTS

View as Markdown

Classes

Functions

createRealtimeTTSPlayer

Creates a new VoxTTS.RealtimeTTSPlayer instance. You can attach media streams later via the VoxTTS.RealtimeTTSPlayer.sendMediaTo or VoxEngine.sendMediaBetween methods.

1createRealtimeTTSPlayer(parameters: RealtimeTTSPlayerParameters): RealtimeTTSPlayer

Parameters

parameters
RealtimeTTSPlayerParametersRequired

Types

RealtimeTTSPlayerParameters

VoxTTS.RealtimeTTSPlayer parameters. Can be passed as arguments to the VoxTTS.createRealtimeTTSPlayer method.

apiKey
string

optional

Optional. VoxTTS API key. Use your VoxTTS API key if you have your own.

createContextParameters
CreateContextParameters

Object to provide parameters directly to the VoxTTS provider Create Context message.

trace
boolean

optional

Optional. Whether to enable the tracing functionality.

If tracing is enabled, a URL to the trace file appears in the ‘websocket.created’ message. The file contains all sent and received WebSocket messages in the plain text format. The file is uploaded to the S3 storage.

Note: Enable this only for diagnostic purposes.

Type aliases

CreateContextParameters

Parameters for creating a VoxTTS provider context. Passed via VoxTTS.RealtimeTTSPlayerParameters.createContextParameters.

1type CreateContextParameters = {
2 /**
3 * Optional. Parameters for creating the TTS context. When omitted or empty, [VoxTTS.VoiceList.Sergey] and [VoxTTS.ModelList.VoxTTS] are used.
4 */
5 create?: {
6 /**
7 * Optional. The model to use for synthesis. Defaults to [VoxTTS.ModelList.VoxTTS].
8 */
9 modelId?: VoxTTSModelList;
10 /**
11 * Optional. The voice to use for synthesis. Defaults to [VoxTTS.VoiceList.Sergey].
12 */
13 voiceId?: VoxTTSVoiceList;
14 /**
15 * Optional. Parameters for cloning the TTS context.
16 */
17 cloning?: Object;
18 };
19 /**
20 * Optional. Identifier of the provider context. Use the same value in [VoxTTS.RealtimeTTSPlayer.send] requests.
21 */
22 contextId?: string;
23 }

VoxTTSSendParameters

Parameters for the VoxTTS.RealtimeTTSPlayer.send method.

1type VoxTTSSendParameters = {
2 /**
3 * Send text message parameters.
4 */
5 send_text: {
6 /**
7 * Text to synthesize.
8 */
9 text: string;
10 /**
11 * Flush context parameters passed directly to the VoxTTS provider.
12 */
13 flush_context: Object;
14 };
15 /**
16 * Optional. Identifier of the provider context.
17 */
18 contextId?: string;
19 }