Class
AudioRecorder
NotBrowsable
Records audio streams in-experience.
This API is in development and is not available yet.
AudioRecorder records audio streams in-experience with a fixed time limit of
60 seconds. The results can be loaded into an AudioPlayer for
playback.
At this time, AudioDeviceInput cannot be recorded. The
GetUnrecordableInstancesAsync()
method can be used to check specifically which instances aren't recordable.
Properties 2#
IsRecordingboolean | Whether the AudioRecorder is currently recording.Write: RobloxEngineSecurityReadSafe |
TimeLengthdouble | The current length of the recording in seconds.ReadSafeReadOnlyNotReplicated |
Methods 9#
| CanRecordAsync | Returns whether the AudioRecorder can currently record.Yields |
| Clear | Clears out the recording from the AudioRecorder. |
| GetConnectedWires | Returns an array of Wires that are connected to the specified
pin. |
| GetInputPins | Gets the list of pins that Wire can use in Wire.TargetName
to connect to this instance via its Wire.TargetInstance property. |
| GetOutputPins | Gets the list of pins that Wire can use in Wire.SourceName
to connect to this instance via its Wire.SourceInstance property. |
| GetTemporaryContent | Returns a Content object representing the current audio recording. |
| GetUnrecordableInstancesAsync | Returns any instances which cannot be recorded.Yields |
| RecordAsync | Starts recording audio.Yields |
| Stop | Stops recording audio. |
CanRecordAsync(): boolean#
Yields
Returns whether the AudioRecorder can currently record. For instance,
this will return false if the current recording data has reached the
recording time limit. To clear the recording, use
Clear().
Returns
boolean—trueif recording is possible,falseotherwise.
Clear(): ()#
Clears out the recording from the AudioRecorder.
Returns
()
GetConnectedWires(pin: string): List<Wire>#
Returns an array of Wires that are connected to the specified
pin. AudioRecorder has one "Input" pin.
| Name | Type | Default | Description |
|---|---|---|---|
pin | string | An input or output pin on this instance |
Returns
List<Wire>— An array ofWires
GetInputPins(): Array#
Gets the list of pins that Wire can use in Wire.TargetName
to connect to this instance via its Wire.TargetInstance property.
For AudioRecorder, this is Input only.
Returns
Array— An array of strings representing valid pin names.
GetOutputPins(): Array#
Gets the list of pins that Wire can use in Wire.SourceName
to connect to this instance via its Wire.SourceInstance property.
For AudioRecorder, there are none.
Returns
Array— An array of strings representing valid pin names.
GetTemporaryContent(): Content#
Returns recorded content that can be played back with AudioPlayer.
The content retrieved from this method is only valid in the current
session.
Returns
Content— A temporaryContentID that can be used withAudioPlayer.
GetUnrecordableInstancesAsync(): List<Instance>#
Yields
Traverses the audio graph, starting from this recorder's inputs, to find
unrecordable instances. Currently, AudioDeviceInput is not
recordable.
Returns
List<Instance>— A table ofInstancesthat are not recordable.
RecordAsync(): ()#
Yields
Starts recording audio. If
CanRecordAsync() returns true,
recording begins. If recording cannot begin, this method produces an
error.
Returns
()
Stop(): ()#
Stops recording audio.
Returns
()
Events 1#
| WiringChanged | Fires when another instance is connected to or disconnected from the
AudioRecorder via a Wire. |
WiringChanged(connected: boolean, 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
AudioRecorder and to some other wirable instance.
| Name | Type | Default | Description |
|---|---|---|---|
connected | boolean | Whether the instance got connected or disconnected. | |
pin | string | The pin on the AudioRecorder that the Wire targets. | |
wire | Wire | The Wire between the AudioRecorder and the other
instance. | |
instance | Instance | The other instance that is or was connected through the Wire. |
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild