---
title: GKVoiceChat
framework: gamekit
role: symbol
role_heading: Class
path: gamekit/gkvoicechat
---

# GKVoiceChat

A voice channel that allows players to speak with each other in a multiplayer game.

## Declaration

```swift
class GKVoiceChat
```

## Mentioned in

Adding voice chat to multiplayer games

## Overview

Overview GameKit provides the underlying mechanism to implement voice chat between players in a multiplayer game. It’s your responsibility to provide player controls and display feedback during the chat. First, configure voice chat by adding the NSMicrophoneUsageDescription key to the Information Property List and creating an audio session. Then, create a GKVoiceChat object using the GKMatch voiceChat(withName:) method passing a string that identifies the voice channel. Use the start() method to connect players to the channel. Use the isActive property to activate the microphone or switch the microphone between channels. Provide a handler using the playerVoiceChatStateDidChangeHandler property to update the interface when a player connects, speaks, or disconnects from a chat. You can also add controls that mute and set the volume using the setPlayer(_:muted:) method and volume property. Note that if there’s insufficient bandwidth over Wi-Fi to maintain a voice chat, GameKit may disconnect players from the channel or disband a channel.

## Topics

### Determining Whether Voice Chat Is Available

- [isVoIPAllowed()](gamekit/gkvoicechat/isvoipallowed().md)

### Starting and Stopping Voice Chat

- [start()](gamekit/gkvoicechat/start().md)
- [stop()](gamekit/gkvoicechat/stop().md)
- [isActive](gamekit/gkvoicechat/isactive.md)

### Receiving Updates About Other Participants

- [playerVoiceChatStateDidChangeHandler](gamekit/gkvoicechat/playervoicechatstatedidchangehandler.md)
- [GKVoiceChat.PlayerState](gamekit/gkvoicechat/playerstate.md)

### Controlling Chat Volume

- [setPlayer(_:muted:)](gamekit/gkvoicechat/setplayer(_:muted:).md)
- [volume](gamekit/gkvoicechat/volume.md)

### Accessing Properties

- [name](gamekit/gkvoicechat/name.md)
- [players](gamekit/gkvoicechat/players.md)

### Deprecated Methods and Properties

- [playerIDs](gamekit/gkvoicechat/playerids.md)
- [playerStateUpdateHandler](gamekit/gkvoicechat/playerstateupdatehandler.md)
- [setMute(_:forPlayer:)](gamekit/gkvoicechat/setmute(_:forplayer:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Deprecated classes

- [GKAchievementViewController](gamekit/gkachievementviewcontroller.md)
- [GKChallengeEventHandler](gamekit/gkchallengeeventhandler.md)
- [GKChallengesViewController](gamekit/gkchallengesviewcontroller.md)
- [GKChallenge](gamekit/gkchallenge.md)
- [GKScoreChallenge](gamekit/gkscorechallenge.md)
- [GKAchievementChallenge](gamekit/gkachievementchallenge.md)
- [GKCloudPlayer](gamekit/gkcloudplayer.md)
- [GKGameCenterViewController](gamekit/gkgamecenterviewcontroller.md)
- [GKGameSession](gamekit/gkgamesession.md)
- [GKGameSessionSharingViewController](gamekit/gkgamesessionsharingviewcontroller.md)
- [GKFriendRequestComposeViewController](gamekit/gkfriendrequestcomposeviewcontroller.md)
- [GKLeaderboardViewController](gamekit/gkleaderboardviewcontroller.md)
- [GKPeerPickerController](gamekit/gkpeerpickercontroller.md)
- [GKScore](gamekit/gkscore.md)
- [GKSession](gamekit/gksession.md)
