Roblox UtilitiesDevlHub Roblox Documentation

Class

AudioRecorder

NotBrowsable
Inherits
Instance › Object
Memory category
Internal

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#

IsRecordingbooleanWhether the AudioRecorder is currently recording.Write: RobloxEngineSecurityReadSafe
TimeLengthdoubleThe current length of the recording in seconds.ReadSafeReadOnlyNotReplicated

IsRecording: boolean#

Write: RobloxEngineSecurityReadSafe

Returns whether the AudioRecorder is currently recording.

TimeLength: double#

ReadOnlyNotReplicatedReadSafe

Returns the current length of the recording in seconds.

Methods 9#

CanRecordAsyncReturns whether the AudioRecorder can currently record.Yields
ClearClears out the recording from the AudioRecorder.
GetConnectedWiresReturns an array of Wires that are connected to the specified pin.
GetInputPinsGets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property.
GetOutputPinsGets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property.
GetTemporaryContentReturns a Content object representing the current audio recording.
GetUnrecordableInstancesAsyncReturns any instances which cannot be recorded.Yields
RecordAsyncStarts recording audio.Yields
StopStops 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 — true if recording is possible, false otherwise.

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.

NameTypeDefaultDescription
pinstringAn input or output pin on this instance
Returns
  • List<Wire> — An array of Wires

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

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 of Instances that 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#

WiringChangedFires 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.

NameTypeDefaultDescription
connectedbooleanWhether the instance got connected or disconnected.
pinstringThe pin on the AudioRecorder that the Wire targets.
wireWireThe Wire between the AudioRecorder and the other instance.
instanceInstanceThe other instance that is or was connected through the Wire.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed