---
title: GKVoiceChatService
framework: gamekit
role: symbol
role_heading: Class
path: gamekit/gkvoicechatservice
---

# GKVoiceChatService

The GKVoiceChatService class allows your application to connect two iOS devices into a voice chat.

## Declaration

```swift
class GKVoiceChatService
```

## Overview

Overview Before you can use voice chat, your application must configure an audio session that allows for both play and recording (kAudioSessionCategory_PlayAndRecord). For more information on audio sessions, see Audio Session Programming Guide. The voice chat service uses a 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()](gamekit/gkvoicechatservice/isvoipallowed().md)

### Getting the Shared Voice Chat Service

- [default()](gamekit/gkvoicechatservice/default().md)

### Setting the Client

- [client](gamekit/gkvoicechatservice/client.md)

### Establishing a Voice Chat

- [startVoiceChat(withParticipantID:)](gamekit/gkvoicechatservice/startvoicechat(withparticipantid:).md)

### Adjusting Audio Properties

- [isMicrophoneMuted](gamekit/gkvoicechatservice/ismicrophonemuted.md)
- [remoteParticipantVolume](gamekit/gkvoicechatservice/remoteparticipantvolume.md)

### Monitoring the Audio Level

- [isInputMeteringEnabled](gamekit/gkvoicechatservice/isinputmeteringenabled.md)
- [inputMeterLevel](gamekit/gkvoicechatservice/inputmeterlevel.md)
- [isOutputMeteringEnabled](gamekit/gkvoicechatservice/isoutputmeteringenabled.md)
- [outputMeterLevel](gamekit/gkvoicechatservice/outputmeterlevel.md)

### Ending a Voice Chat

- [stopVoiceChat(withParticipantID:)](gamekit/gkvoicechatservice/stopvoicechat(withparticipantid:).md)

### Methods Called by the Client

- [acceptCallID(_:)](gamekit/gkvoicechatservice/acceptcallid(_:).md)
- [denyCallID(_:)](gamekit/gkvoicechatservice/denycallid(_:).md)
- [receivedData(_:fromParticipantID:)](gamekit/gkvoicechatservice/receiveddata(_:fromparticipantid:).md)
- [receivedRealTime(_:fromParticipantID:)](gamekit/gkvoicechatservice/receivedrealtime(_:fromparticipantid:).md)

### Constants

- [Voice Chat Service Error Domain](gamekit/voice-chat-service-error-domain.md)
- [GKVoiceChatServiceError.Code](gamekit/gkvoicechatserviceerror-swift.struct/code.md)
- [GKVoiceChatServiceError](gamekit/gkvoicechatserviceerror-swift.struct.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)
