<!--
{
  "availability" : [
    "iOS: 3.0.0 - 7.0.0",
    "iPadOS: 3.0.0 - 7.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.0.0 - 3.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKVoiceChatService",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKVoiceChatService"
  },
  "title" : "GKVoiceChatService"
}
-->

# GKVoiceChatService

The [`GKVoiceChatService`](/documentation/GameKit/GKVoiceChatService) class allows your application to connect two iOS devices into a voice chat.

```
class GKVoiceChatService
```

## Overview

Before you can use voice chat, your application must configure an audio session that allows for both play and recording (<doc://com.apple.documentation/documentation/AudioToolbox/kAudioSessionCategory_PlayAndRecord>). For more information on audio sessions, see [Audio Session Programming Guide](https://developer.apple.com/library/archive/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007875).

The voice chat service uses a [`client`](/documentation/GameKit/GKVoiceChatService/client) implemented by your application to find and connect to other participants. Each participant in the chat is identified by a unique *participant identifier* string. The client provides a participant identifier for the local user and translates other participant identifiers into connections to other users.  The format and mechanism used to translate participant identifiers into network connections is defined by the client.

Your application can configure the voice chat service to control the volume level of both local and remote participants and to detect when someone is speaking.

To use the voice chat service, your application retrieves the default service and attaches a client to it, then either connects to another participant or waits for them to start a connection.

## Topics

### Determining Whether Voice Chat Is Available

[`+  isVoIPAllowed`](/documentation/GameKit/GKVoiceChatService/isVoIPAllowed())

Returns whether voice chat is allowed to be used on the device.

### Getting the Shared Voice Chat Service

[`+  defaultVoiceChatService`](/documentation/GameKit/GKVoiceChatService/default())

Retrieves the singleton chat service.

### Setting the Client

[`client`](/documentation/GameKit/GKVoiceChatService/client)

An object that the voice chat service uses to communicate with remote participants.

### Establishing a Voice Chat

[`-  startVoiceChatWithParticipantID:error:`](/documentation/GameKit/GKVoiceChatService/startVoiceChat(withParticipantID:))

Sends a request to another participant to join the voice chat.

### Adjusting Audio Properties

[`microphoneMuted`](/documentation/GameKit/GKVoiceChatService/isMicrophoneMuted)

A Boolean value that determines whether the user’s microphone is muted.

[`remoteParticipantVolume`](/documentation/GameKit/GKVoiceChatService/remoteParticipantVolume)

A float that scales the volume of all remote participants.

### Monitoring the Audio Level

[`inputMeteringEnabled`](/documentation/GameKit/GKVoiceChatService/isInputMeteringEnabled)

A Boolean value that indicates whether the microphone’s sound level is being monitored.

[`inputMeterLevel`](/documentation/GameKit/GKVoiceChatService/inputMeterLevel)

The volume, in decibels (db), being received by the microphone.

[`outputMeteringEnabled`](/documentation/GameKit/GKVoiceChatService/isOutputMeteringEnabled)

A Boolean value that indicates whether the voice level of remote participants is monitored.

[`outputMeterLevel`](/documentation/GameKit/GKVoiceChatService/outputMeterLevel)

The volume, in decibels (db), being received from all other participants.

### Ending a Voice Chat

[`-  stopVoiceChatWithParticipantID:`](/documentation/GameKit/GKVoiceChatService/stopVoiceChat(withParticipantID:))

Ends a previously established voice chat.

### Methods Called by the Client

[`-  acceptCallID:error:`](/documentation/GameKit/GKVoiceChatService/acceptCallID(_:))

Accepts a request from a remote user to establish a voice chat.

[`-  denyCallID:`](/documentation/GameKit/GKVoiceChatService/denyCallID(_:))

Rejects a request to establish a voice chat.

[`-  receivedData:fromParticipantID:`](/documentation/GameKit/GKVoiceChatService/receivedData(_:fromParticipantID:))

Called by the client to deliver new data received from a remote participant.

[`-  receivedRealTimeData:fromParticipantID:`](/documentation/GameKit/GKVoiceChatService/receivedRealTime(_:fromParticipantID:))

Called by the client to deliver voice data received from a remote participant..

### Constants

[Voice Chat Service Error Domain](/documentation/GameKit/voice-chat-service-error-domain)

The [`GKVoiceChatService`](/documentation/GameKit/GKVoiceChatService) error domain.

[`Code`](/documentation/GameKit/GKVoiceChatServiceError-swift.struct/Code)

Error codes for the voice chat service error domain.

[`GKVoiceChatServiceError`](/documentation/GameKit/GKVoiceChatServiceError-swift.struct)

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)