Skip to main content

Documentation Index

Fetch the complete documentation index at: https://dev.docs.inworld.ai/llms.txt

Use this file to discover all available pages before exploring further.

Constructors

Methods


Constructors

constructor

new TTSRequest(request: TTSRequestInterface): TTSRequest
Creates a new TTSRequest instance.

Parameters

request
TTSRequestInterface
required
The TTS request to wrap.

Returns

TTSRequest

Methods

withText

withText(text: string, voice?: VoiceInterface): TTSRequest
Creates a TTSRequest with text content.

Parameters

text
string
required
The text content to synthesize
voice
VoiceInterface
Optional voice configuration

Returns

TTSRequest

withStream

withStream(stream: TextStream, voice?: VoiceInterface, synthesisConfig?: SpeechSynthesisConfigInterface): TTSRequest
Creates a TTSRequest with stream content.

Parameters

stream
TextStream
required
The stream content to synthesize
voice
VoiceInterface
Optional voice configuration
synthesisConfig
SpeechSynthesisConfigInterface

Returns

TTSRequest

hasTextContent

hasTextContent(): boolean
Checks if the request has text content.

Returns

boolean

hasStreamContent

hasStreamContent(): boolean
Checks if the request has stream content.

Returns

boolean

getText

getText(): string
Gets the text content if available.

Returns

string

getVoice

getVoice(): VoiceInterface
Gets the voice configuration if available.

Returns

VoiceInterface