Reference API Roblox

Engine API

Website

Related

Reference API Roblox

VoiceChatService

VoiceChatService holds voice functions not tied to other instances.

This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service]

Member index 40

HistoryMember
553EnableDefaultVoice: bool
613UseAudioApi: AudioApiRollout
497IsVoiceEnabledForUserIdAsync(userId: int64): bool
631joinVoice(): null
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553ClassName: string
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
553className: string
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
486GetChildren(): Objects
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
462GetPropertyChangedSignal(property: string): RBXScriptSignal
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsA(className: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
553children(): Objects
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
553getChildren(): Objects
462isA(className: string): bool
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462Changed(property: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)

Removed member index 24

HistoryMember
519GenerateDefaultChannel: bool
499GetAndClearCallFailureMessage(): string
499GetAudioProcessingSettings(): Tuple
499GetGroupId(): string
499GetMicDevices(): Tuple
499GetParticipants(): Array
499GetSpeakerDevices(): Tuple
499GetVoiceChatApiVersion(): int
499GetVoiceChatAvailable(): int
499IsContextVoiceEnabled(): bool
499IsPublishPaused(): bool
499IsSubscribePaused(userId: int64): bool
499JoinByGroupId(groupId: string, isMicMuted: bool = false): bool
499JoinByGroupIdToken(groupId: string, isMicMuted: bool = false): bool
499Leave(): void
499PublishPause(paused: bool): bool
499SetMicDevice(micDeviceName: string, micDeviceGuid: string): void
499SetSpeakerDevice(speakerDeviceName: string, speakerDeviceGuid: string): void
499SubscribePause(userId: int64, paused: bool): bool
499SubscribePauseAll(paused: bool): bool
499ParticipantsStateChanged(participantsLeft: Array, participantsJoined: Array, updatedStates: Array)
499PlayerMicActivitySignalChange(activityInfo: Dictionary)
499StateChanged(old: VoiceChatState, new: VoiceChatState)

Description

VoiceChatService holds voice functions not tied to other instances.

History 148

Members 40

EnableDefaultVoice

TypeDefault
booltrue

Indicates whether or not the place uses the default voice manager. This is enabled by default.

When enabled, the default voice manager adds all voice-eligible users to voice chat as they join the place. When disabled, the place doesn't use the default voice manager, and users are not added to voice chat when they join the place.

History 3

IsVoiceEnabledForUserIdAsync

Parameters (1)
userIdint64
Returns (1)
bool

Returns whether or not the given user has voice enabled. On the client-side, this can only be used to check the voice status of the local player. On the server-side, this can only check the voice status for players in that server.

This function can throw an error if the HTTP call fails.

The following code sample enables a UI layer only for voice enabled players.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
local Players = game:GetService("Players")
local VoiceChatService = game:GetService("VoiceChatService")

local localPlayer = Players.LocalPlayer
local success, enabled = pcall(function()
	return VoiceChatService:IsVoiceEnabledForUserIdAsync(localPlayer.UserId)
end)
if success and enabled then
	localPlayer.PlayerGui.MyVoiceGui.Enabled = true
end
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

UseAudioApi

TypeDefault
AudioApiRolloutAutomatic

History 4

joinVoice

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

History 1

Removed members 24

GenerateDefaultChannel

TypeDefault
bool
This property is not browsable. It is not visible in Studio's object browser.

History 2

Tags: [NotBrowsable]

GetAndClearCallFailureMessage

Parameters (0)
No parameters.
Returns (1)
string
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 4

Tags: [Deprecated]

GetAudioProcessingSettings

Parameters (0)
No parameters.
Returns (1)
Tuple
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

GetGroupId

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

History 2

GetMicDevices

Parameters (0)
No parameters.
Returns (1)
Tuple
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

GetParticipants

Parameters (0)
No parameters.
Returns (1)
Array
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

GetSpeakerDevices

Parameters (0)
No parameters.
Returns (1)
Tuple
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

GetVoiceChatApiVersion

Parameters (0)
No parameters.
Returns (1)
int
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

GetVoiceChatAvailable

Parameters (0)
No parameters.
Returns (1)
int
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

IsContextVoiceEnabled

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

History 2

IsPublishPaused

Parameters (0)
No parameters.
Returns (1)
bool
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

IsSubscribePaused

Parameters (1)
userIdint64
Returns (1)
bool
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

JoinByGroupId

Parameters (2)Default
groupIdstring
isMicMutedboolfalse
Returns (1)
bool
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

JoinByGroupIdToken

Parameters (2)Default
groupIdstring
isMicMutedboolfalse
Returns (1)
bool
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

Leave

Parameters (0)
No parameters.
Returns (1)
void
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

ParticipantsStateChanged

Parameters (3)
participantsLeftArray
participantsJoinedArray
updatedStatesArray
This event is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 4

Tags: [Deprecated]

PlayerMicActivitySignalChange

Parameters (1)
activityInfoDictionary
This event is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 4

Tags: [Deprecated]

PublishPause

Parameters (1)
pausedbool
Returns (1)
bool
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

SetMicDevice

Parameters (2)
micDeviceNamestring
micDeviceGuidstring
Returns (1)
void
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

SetSpeakerDevice

Parameters (2)
speakerDeviceNamestring
speakerDeviceGuidstring
Returns (1)
void
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

StateChanged

Parameters (2)
oldVoiceChatState
newVoiceChatState
This event is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 4

Tags: [Deprecated]

SubscribePause

Parameters (2)
userIdint64
pausedbool
Returns (1)
bool
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

SubscribePauseAll

Parameters (1)
pausedbool
Returns (1)
bool
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

Settings