AudioTextToSpeech
Plays text as speech audio.
Memory category | Internal |
---|
Member index 20
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
- 665 Change Tags of AudioTextToSpeech from [] to [NotBrowsable]
- 664 Add WiringChanged
- 664 Add Looped
- 664 Add Ended
- 664 Add Unload
- 664 Add Play
- 664 Add Pause
- 664 Add LoadAsync
- 664 Add GetWaveformAsync
- 664 Add GetConnectedWires
- 664 Add Volume
- 664 Add VoiceId
- 664 Add TimePosition
- 664 Add TimeLength
- 664 Add Text
- 664 Add Speed
- 664 Add PlaybackSpeed
- 664 Add Pitch
- 664 Add Looping
- 664 Add IsPlaying
- 664 Add IsLoaded
- 664 Add AudioTextToSpeech
- 663 Remove AudioTextToSpeech
- 662 Add AudioTextToSpeech
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.
Thread safety | Unsafe |
---|
GetConnectedWires
Parameters (1) | ||
---|---|---|
pin | string | |
Returns (1) | ||
Instances |
Returns an array of Wires that are connected to the specified pin. AudioTextToSpeech has one "Output" pin.
Thread safety | Unsafe |
---|
History 1
- 664 Add GetConnectedWires
GetWaveformAsync
Parameters (2) | ||
---|---|---|
timeRange | NumberRange | |
samples | int | |
Returns (1) | ||
Array |
Thread safety | Unsafe |
---|
History 1
- 664 Add GetWaveformAsync
IsLoaded
Type | Default | |
---|---|---|
bool | false |
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.
Thread safety | ReadSafe |
---|---|
Category | Asset |
Loaded/Saved | false/true |
IsPlaying
Type | Default | |
---|---|---|
bool | false |
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.
Write security | RobloxSecurity |
---|---|
Thread safety | ReadSafe |
Category | Playback |
Loaded/Saved | false |
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.
Thread safety | Unsafe |
---|
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.
Thread safety | Unsafe |
---|
Looping
Type | Default | |
---|---|---|
bool | false |
Controls whether the AudioTextToSpeech object loops when exceeding the end of its TimeLength.
Thread safety | ReadSafe |
---|---|
Category | Playback |
Loaded/Saved | true |
Pause
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Pauses the AudioTextToSpeech object wherever its TimePosition is. Replicates from server to client.
Thread safety | Unsafe |
---|
Pitch
Type | Default | |
---|---|---|
float | 0 |
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.
Thread safety | ReadSafe |
---|---|
Category | Asset |
Loaded/Saved | true |
Play
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Plays the AudioTextToSpeech from wherever its TimePosition is. Replicates from server to client.
Thread safety | Unsafe |
---|
PlaybackSpeed
Type | Default | |
---|---|---|
float | 1 |
Multiplier controlling how quickly the speech audio will be played, directly controlling its perceived pitch. Ranges from 0 to 20.
Thread safety | ReadSafe |
---|---|
Category | Playback |
Loaded/Saved | true |
History 1
- 664 Add PlaybackSpeed
Speed
Type | Default | |
---|---|---|
float | 1 |
Multiplier controlling the speed of the generated speech audio. Ranges from 0.5 to 2.0.
Thread safety | ReadSafe |
---|---|
Category | Asset |
Loaded/Saved | true |
Text
Type | Default | |
---|---|---|
string |
The text to be converted into speech audio by AudioTextToSpeech.
Thread safety | ReadSafe |
---|---|
Category | Asset |
Loaded/Saved | true |
TimeLength
Type | Default | |
---|---|---|
double | 0 |
Denotes the generated speech audio in seconds.
Thread safety | ReadSafe |
---|---|
Category | Asset |
Loaded/Saved | false/true |
History 1
- 664 Add TimeLength
TimePosition
Type | Default | |
---|---|---|
double | 0 |
Tracks and controls the current position of the playhead within the generated speech audio, in seconds.
Thread safety | ReadSafe |
---|---|
Category | Playback |
Loaded/Saved | true |
History 1
- 664 Add TimePosition
Unload
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Frees resources by unloading the generated speech audio.
Thread safety | Unsafe |
---|
VoiceId
Type | Default | |
---|---|---|
string |
The voice style to be used byAudioTextToSpeech.
Thread safety | ReadSafe |
---|---|
Category | Asset |
Loaded/Saved | true |
Volume
Type | Default | |
---|---|---|
float | 1 |
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.
Thread safety | ReadSafe |
---|---|
Category | State |
Loaded/Saved | true |
WiringChanged
Parameters (4) | |
---|---|
connected | bool |
pin | string |
wire | Wire |
instance | Instance |
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.
Thread safety | Unsafe |
---|
History 1
- 664 Add WiringChanged