Voice Interface

Use the Voice interface to create and manage voice chat rooms for your users while they use your product.

Preview
7 mins to read

Epic Online Services (EOS) Voice helps you create and manage voice chat rooms for your users. You can host EOS Voice chat rooms on Epic's server(s) using EOS Lobbies, or on your back-end server(s). Also, a user can communicate one-on-one or in groups across multiple platforms, during a match, and in your product's lobby.

The connections made with EOS Voice establish only between authenticated users and go through Voice servers without exposing personal information (PI) about the users. EOS handles all the scaling, quality of service, maintenance, multi-region presence, and other machinery of the voice servers.

The Voice interface requires EOS SDK release 1.13 or higher.

Voice will be fully supported by the Online Subsystem (OSS) and the VoiceChat plugins with the Unreal Engine 4.27 release.

To use the Voice interface, you should:

  1. Review and determine the integration method you want to use with your game.
  2. Investigate the Voice sample (C and C#) and learn how to use the Voice interface with your product.
  3. Integrate the Voice interface into your applications:
    1. Configure your client policies
    2. Integrate the Voice interface based on your chosen integration method.
  4. Review the best practices, voice metrics, and usage limitations for the Voice interface.

Voice Integration Methods

You can integrate Voice into your application in two ways:

  • Use Voice with Lobbies: Integrate the EOS SDK into your Game Client and let EOS Lobbies take care of room management and authorization. Using the Lobbies Interface only requires a client integration and offers room ownership, search, and invites.

  • Use a Trusted Server Application: Integrate the EOS SDK into your Game Client and the SDK or the Web API into a trusted server application. This approach gives developers the most flexibility by allowing them to customize room management and authorization, but requires more integration effort.

Voice with Lobbies

When using Voice with Lobbies, integrate the EOS SDK into your Game Client and let Lobbies take on the role of the trusted server application. The lobby generates roomIds, creates tokens for members, and authorizes requests to join, kick, or mute other players.

To secure rooms, lobbies can be made private and require invites.

Policy Configuration

Configure your client policy for the Game Client with userRequired and allow:

  • Lobbies with actions appropriate for that client, such as connect, readLobby, and so on
  • Voice with the lobbyConference action

createRoomToken, mute, and kick are intended for server use only and should remain disabled. Otherwise, this would allow Game Clients access to any roomId.

Voice Flow with Lobbies

  1. The Game Client initializes the SDK and acquires the EOS_HLobby interface as well as the EOS_RTC and EOS_RTCAudio interface.
  2. The Game Client authorizes the local user using the Connect interface.
  3. The Game Client creates a new Lobby using EOS_Lobby_CreateLobby with the bEnableRTCRoom flag enabled.
  4. The Lobby requests room tokens and returns them with the media server URL. The EOS SDK then uses the token to join the voice room.
  5. Other users joining the lobby automatically receive the matching room token to join the voice conference.
  6. The Lobby owner can send out invites to other players, and public lobbies can be searched for and joined without an invitation.
  7. The Lobby owner can mute or kick other players.
  8. All clients use the EOS_RTC and EOS_RTCAudio interfaces to manage audio input/output, change the local mute/speaker status, or leave the room.

The EOS SDK Lobbies sample demonstrates this configuration.

For more control over room management and authorization with Voice, you can use the Trusted Server Application integration instead.

Voice with a Trusted Server Application

Policy Configurations

Configure your client policy for the Server with:

  • userRequired disabled to allow the server to use clientId and client secret for authorization with the Connect interface.
  • Voice with createRoomToken, kick, and mute to allow the server to create room tokens for players for any roomId, remove a player and revoke their token, and mute a player, respectively.

Voice Flow with a Trusted Server