# This file is automatically generated. Please don't edit it manually. # To submit a bug report on the content, see # https://devforum.roblox.com/c/bug-reports/documentation-issues/72 name: VoiceChatService type: class memory_category: Instances summary: | **VoiceChatService** is responsible for voice chat's high-level functionality. 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. code_samples: [] inherits: - Instance descendants: [] tags: - NotCreatable - Service deprecation_message: '' properties: - name: VoiceChatService.DefaultDistanceAttenuation summary: | Determines which distance attenuation curve the default voice chat setup uses when `Class.AudioDeviceInput` and `Class.AudioEmitter` objects are generated. description: | This property controls the default distance attenuation curve assigned to any generated `Class.AudioEmitter` instances in the default voice chat setup. This property only has an effect if `Class.VoiceChatService.EnableDefaultVoice|EnableDefaultVoice` and `Class.VoiceChatService.UseAudioApi|UseAudioApi` are both enabled, since no `Class.AudioEmitter|AudioEmitters` are otherwise generated. code_samples: [] type: VoiceChatDistanceAttenuationType tags: [] deprecation_message: '' security: read: PluginSecurity write: PluginSecurity thread_safety: ReadSafe category: Behavior serialization: can_load: true can_save: true capabilities: [] - name: VoiceChatService.EnableDefaultVoice summary: | Controls whether each voice-eligible player can be heard as though they were speaking through their character. description: | 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 `Class.VoiceChatService.UseAudioApi|UseAudioApi`. When `Class.VoiceChatService.UseAudioApi|UseAudioApi` is `Enum.AudioApiRollout|Enabled`, disabling this property disables the default setup, but `Class.AudioDeviceInput` will still work. Conversely, when `Class.VoiceChatService.UseAudioApi|UseAudioApi` is `Enum.AudioApiRollout|Disabled`, disabling the default voice setup effectively disables voice chat altogether. code_samples: [] type: boolean tags: [] deprecation_message: '' security: read: PluginSecurity write: PluginSecurity thread_safety: ReadSafe category: Behavior serialization: can_load: true can_save: true capabilities: [] - name: VoiceChatService.UseAudioApi summary: | Controls whether voice chat is represented and controlled by `Class.AudioDeviceInput` objects. description: | If `Enum.AudioApiRollout|Enabled`, the voice chat setup is represented and controlled by `Class.AudioDeviceInput` objects. More specifically: - An `Class.AudioDeviceInput` will be created and parented to each voice-eligible `Class.Player`. - An `Class.AudioEmitter` will be created and parented to each voice-eligible player's `Class.Player.Character`. - An `Class.AudioListener` will be created and parented to `Class.Workspace.CurrentCamera`. You can disable the default setup by setting `Class.VoiceChatService.EnableDefaultVoice` to `false`. If `Enum.AudioApiRollout|Disabled`, the voice chat setup is done through an internal-only system. Currently, setting this to `Enum.AudioApiRollout|Automatic` has the same meaning as `Enum.AudioApiRollout|Disabled`. However, in the future, `Enum.AudioApiRollout|Automatic` will become `Enum.AudioApiRollout|Enabled`, so that new experiences can achieve greater customization over voice. code_samples: [] type: AudioApiRollout tags: [] deprecation_message: '' security: read: PluginSecurity write: PluginSecurity thread_safety: ReadSafe category: Behavior serialization: can_load: true can_save: true capabilities: [] methods: - name: VoiceChatService:IsVoiceEnabledForUserIdAsync summary: | Returns whether or not the given user has voice enabled. description: | 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. ```lua 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 ``` code_samples: [] parameters: - name: userId type: int64 default: summary: | The `Class.Player.UserId` to check. returns: - type: boolean summary: | If that user has voice enabled. tags: - Yields deprecation_message: '' security: None thread_safety: Unsafe capabilities: [] events: [] callbacks: []