Skip to content

add Voice Audio Processing #72

@switchupcb

Description

@switchupcb

Voice Audio Processing

You can implement Voice Audio Processing with the information here.

The Discord Voice feature has been partially implemented in #71.

Here is how the current implementation works.

  1. Bot connects to Discord Gateway.
  2. Bot connects to Discord Voice (Gateway).
  3. Bot "connects" to UDP Connection.

This implementation is implemented through the VoiceChannelConnection struct.

This implementation lets users connect to Voice Channels and handle the voice channel's events from the Discord Gateway and Discord Voice (Gateway). However, Voice Audio Processing has not been implemented.

How do you add Voice Audio Processing?

You must implement the following logic in ./wrapper (marked by // TODO comments).

  1. Encryption and Decryption of Voice Data
  2. OPUS encoding and decoding for Voice Data
  3. Voice Version 8 Updates
    • Dasgo structs for Voice Version 8
    • DAVE

What else must be added to complete the Voice feature?

Disconnect and Reconnect States

You can add Disconnect, Reconnect functions for VoiceChannelConnection similar to the Session struct functions.

This requires you to modify the code which manages the connection states for the VoiceSession struct and the net.UDPConn.

Right now, the VoiceSession struct state code is modeled after the Gateway Session struct state code (prior to the refactor in #78). However, the logic is more complex due to the additional state (i.e. net.UDPConn) which must be managed to control this feature.

You could refactor this code to model the new Gateway Session struct state code.

Voice Test

The integration test for the voice_test.go can then be modified to include these Disconnect, Reconnect functions similarly to the session_test.go.

Voice Example

You can implement the Voice Example Outline using the "Guide" in the Roadmap Feature Tracker.

Voice Tools

You can implement tools functions for Disgo Voice features.

Voice Shard

You can implement shard functions for Disgo Voice features based on the Disgo shard features for the Discord Gateway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions