Reference API Roblox

Engine API

Website

Related

Reference API Roblox

VoiceChatService

VoiceChatService is responsible for voice chat's high-level functionality.

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 42

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

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 is responsible for voice chat's high-level functionality. This mostly consists of configuration options, and functions that are not specifically-controlled by more-specific instances.

History 150

Members 42

EnableDefaultVoice

TypeDefault
booltrue

When enabled, each voice-eligible player can be heard as though they were speaking through their character. The implementation details of the voice setup depend on UseAudioApi.

When UseAudioApi is Disabled, disabling the default voice setup effectively disables voice chat altogether.

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.

 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
	print("Voice chat enabled!")
end
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

UseAudioApi

TypeDefault
AudioApiRolloutAutomatic

If Enabled, the voice chat setup is represented and controlled by AudioDeviceInput objects. More specifically:

If Disabled, the voice chat setup is done through an internal-only system.

Currently, setting this to Automatic has the same meaning as Disabled. However, in the future, Automatic will become Enabled, so that new experiences can achieve greater customization over voice.

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