Class · inherits Instance
AudioDeviceInput
Produces audio streams from physical devices, such as microphones.
About AudioDeviceInput
AudioDeviceInput produces audio streams from physical devices, such as
microphones. It provides a single Output pin which can be connected to
other pins via Wires. AudioDeviceInput has properties for
selecting which Player is producing the stream, and controlling
whether or not they are muted.
Properties 5
AccessType
: AccessModifierTypeDetermines whether the list of user IDs provided toSetUserIdAccessListis treated as an allow-list or deny-list.Determines whether the list of user IDs provided to
SetUserIdAccessListis treated as an allow-list or deny-list.If
AccessTypeisAccessModifierType.Allow, then only the supplied user IDs are permitted to hear thisAudioDeviceInput. IfAccessTypeisAccessModifierType.Deny, then only the supplied user IDs are blocked from hearing thisAudioDeviceInput.Since player voices are networked, this property should only be assigned from the server in order to replicate properly.
Active
: booleanControls whether the physical device is actively recording.Controls whether the physical device is actively recording. This property is only set by Roblox core scripts, but it may be read by user scripts. Generally, an
AudioDeviceInputmay only be producing sound ifActiveis true andMutedis false.Muted
: booleanControls whether thisAudioDeviceInputis muted.Controls whether this
AudioDeviceInputis muted. UnlikeActive, this property is publicly scriptable.Generally, an
AudioDeviceInputmay only be heard ifActiveis true andMutedis false.Player
: PlayerDetermines whose device is producing sound.Determines whose device is producing sound. In order to replicate properly, this should only be assigned from the server. Assigning this property locally generally does not work, unless
PlayerisPlayers.LocalPlayer.Volume
: floatVolume level which is multiplied onto the output audio stream.Volume level which is multiplied onto the output audio stream. Ranges from 0 to 3.
Methods 5
GetConnectedWires
(pin: string) → List<Wire>Returns an array ofWiresthat are connected to the specified pin.Returns an array of
Wiresthat are connected to the specified pin.AudioDeviceInputhas one "Output" pin.GetInputPins
() → ArrayGets the list of pins thatWirecan use inWire.TargetNameto connect to this instance via itsWire.TargetInstanceproperty.Gets the list of pins that
Wirecan use inWire.TargetNameto connect to this instance via itsWire.TargetInstanceproperty.For
AudioDeviceInput, there are none.GetOutputPins
() → ArrayGets the list of pins thatWirecan use inWire.SourceNameto connect to this instance via itsWire.SourceInstanceproperty.Gets the list of pins that
Wirecan use inWire.SourceNameto connect to this instance via itsWire.SourceInstanceproperty.For
AudioDeviceInput, this isOutputonly.GetUserIdAccessList
() → ArrayReturns a list of user IDs that are either permitted to hear or blocked from hearing thisAudioDeviceInput.Returns a list of user IDs that are either permitted to hear or blocked from hearing this
AudioDeviceInput, depending on theAccessType.SetUserIdAccessList
(userIds: Array) → ()Sets a list of user IDs that are either permitted to hear or blocked from hearing thisAudioDeviceInput.Sets a list of user IDs that are either permitted to hear or blocked from hearing this
AudioDeviceInput, depending on theAccessType.Note that this method replicates from server to client; in general, it should only be called from the server in order to replicate properly.
Events 1
WiringChanged
AudioDeviceInput.WiringChanged:Connect(function(connected, pin, wire, instance))Fires when another instance is connected to or disconnected from theAudioDeviceInputvia aWire.Event that fires after a
Wirebecomes connected or disconnected, and thatWireis now or was previously connected to a pin on theAudioDeviceInputand to some other wirable instance.
AudioDeviceInput also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.