A GDExtension that adds to Godot4 support for encoding voice data using the Opus Codec. This can be useful for those who want to implement VOIP systems for Godot4 games.
## Overview
This extension adds a new singleton to Godot: `Opus` with two methods: `encode` and `decode`.
These can be used to compress audio obtained `AudioEffectCapture` and then to decode it so it's usable in Godot again.
var id = client.multiplayer.get_remote_sender_id()
var decoded = Opus.decode(data)
for b in range(0, BUFFER_SIZE):
_get_generator(id).push_frame(decoded[b])
```
## Known limitations
- This is more POC than a production-ready solution although it's not too far from achieving this status. I'm using this code successfully in a scenario similar to the one presented in this demo: