Reference API Roblox

Engine API

Website

Related

Reference API Roblox

AudioTextToSpeech

Plays text as speech audio.

This class is not browsable. It is not visible in Studio's object browser.
Tags: [NotBrowsable]

Member index 20

HistoryMember
664IsLoaded: bool
664IsPlaying: bool
664Looping: bool
664Pitch: float
664PlaybackSpeed: float
664Speed: float
664Text: string
664TimeLength: double
664TimePosition: double
664VoiceId: string
664Volume: float
664GetConnectedWires(pin: string): Instances
664GetWaveformAsync(timeRange: NumberRange, samples: int): Array
664LoadAsync(): AssetFetchStatus
664Pause(): null
664Play(): null
664Unload(): null
664Ended()
664Looped()
664WiringChanged(connected: bool, pin: string, wire: Wire, instance: Instance)
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
670Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

AudioTextToSpeech is used to play text as speech audio. It provides a single Output pin which can be connected to other pins via Wires. This API is still in development and is not yet publicly available.

History 24

Members 20

Ended

Parameters (0)
No parameters.

Fires after the AudioTextToSpeech object has completed playback and paused. Note this event will not fire for audio with Looped set to true since it continues playing upon reaching its end. This event will also not fire when the audio is paused before playback has completed; for this, use AudioTextToSpeech:GetPropertyChangedSignal() on the IsPlaying property.

This event is may be used to destroy an AudioTextToSpeech object when it has completed playback.

History 1

GetConnectedWires

Parameters (1)
pinstring
Returns (1)
Instances

Returns an array of Wires that are connected to the specified pin. AudioTextToSpeech has one "Output" pin.

History 1

GetWaveformAsync

Parameters (2)
timeRangeNumberRange
samplesint
Returns (1)
Array
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

IsLoaded

TypeDefault
boolfalse

Denotes whether the AudioTextToSpeech object is loaded, buffered, and ready to play. Although uncommon, AudioTextToSpeech objects may have their assets unloaded at runtime if there is extreme memory pressure, in which case IsLoaded will become false.

This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 1

Tags: [ReadOnly, NotReplicated]

IsPlaying

TypeDefault
boolfalse

Denotes whether the AudioTextToSpeech object is currently playing. This property is read-only, but replicates. To play and stop an AudioTextToSpeech object at runtime, use the Play() and Pause() methods.

History 1

LoadAsync

Parameters (0)
No parameters.
Returns (1)
AssetFetchStatus

A blocking call that begins the generation of speech audio based on the current parameters. It will yield until the speech generation either completes or fails. Status is returned by an AssetFetchStatus value.

This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

Looped

Parameters (0)
No parameters.

Event that fires after the AudioTextToSpeech object loops. This happens when the audio reaches the end of its content and Looping is true.

This event does not fire if the audio is looped manually by changing its TimePosition.

History 1

Looping

TypeDefault
boolfalse

Controls whether the AudioTextToSpeech object loops when exceeding the end of its TimeLength.

History 1

Pause

Parameters (0)
No parameters.
Returns (1)
null

Pauses the AudioTextToSpeech object wherever its TimePosition is. Replicates from server to client.

History 1

Pitch

TypeDefault
float0

A value in musical semitones. The pitch of the generated speech audio is shifted from its default value by AudioTextToSpeech.Pitch semitones. Ranges from -12.0 to 12.0.

History 1

Play

Parameters (0)
No parameters.
Returns (1)
null

Plays the AudioTextToSpeech from wherever its TimePosition is. Replicates from server to client.

History 1

PlaybackSpeed

TypeDefault
float1

Multiplier controlling how quickly the speech audio will be played, directly controlling its perceived pitch. Ranges from 0 to 20.

History 1

Speed

TypeDefault
float1

Multiplier controlling the speed of the generated speech audio. Ranges from 0.5 to 2.0.

History 1

Text

TypeDefault
string

The text to be converted into speech audio by AudioTextToSpeech.

History 1

TimeLength

TypeDefault
double0

Denotes the generated speech audio in seconds.

This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 1

Tags: [ReadOnly, NotReplicated]

TimePosition

TypeDefault
double0

Tracks and controls the current position of the playhead within the generated speech audio, in seconds.

History 1

Unload

Parameters (0)
No parameters.
Returns (1)
null

Frees resources by unloading the generated speech audio.

History 1

VoiceId

TypeDefault
string

The voice style to be used byAudioTextToSpeech.

History 1

Volume

TypeDefault
float1

Volume level which is multiplied onto the output audio stream, controlling how loudly the generated speech audio will be played. Ranges from 0 to 3.

History 1

WiringChanged

Parameters (4)
connectedbool
pinstring
wireWire
instanceInstance

Event that fires after a Wire becomes connected or disconnected, and that Wire is now or was previously connected to a pin on the AudioTextToSpeech and to some other wirable instance.

History 1

Settings

Appearance
Visibility