Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement an audio codec like libopus in order to save bandwidth #38

Open
ludzeller opened this issue Oct 9, 2024 · 1 comment

Comments

@ludzeller
Copy link

Is there any guidance, hook, or template for how to implement an audio codec like libopus in order to save bandwidth? I am using univoice in combination with Unity Relay and the voice transmission quickly creates hundreds of MB per hour per session.

https://github.com/xiph/opus

Implementing libopus as external native library for Unity should be straightforward, but I am specifically asking where in the univoice system one would add the compression and decompression. Any thoughts on that?

@adrenak
Copy link
Owner

adrenak commented Dec 23, 2024

Hi @ludzeller sorry for the super late reply.

Univoice is getting Opus out of the box in version 4 soon. In the meantime you can check out this fork of UnityOpus I made recently: https://github.com/adrenak/UnityOpus

Here is the scripting reference: https://www.vatsalambastha.com/UnityOpus/

There's some more info here: https://www.reddit.com/r/Unity3D/comments/1hgqq5g/opensource_unityopus_encode_your_audio_data_using/

As far as where you'd put this, you can add it to ChatroomAgent where you encode and decode the audio using opus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants