voice icon indicating copy to clipboard operation
voice copied to clipboard

Allow users to pass a custom Opus library

Open Hazmi35 opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. No.

Describe the ideal solution Adding an option to choose explicitly what opus lib to be used

Describe alternatives you've considered An option to use own custom opus library

Additional context Allowing users to pass what opus lib to choose explicitly or allowing them to pass custom opus library

Hazmi35 avatar Aug 18 '21 12:08 Hazmi35

What's the use-case for this?

kyranet avatar Aug 18 '21 14:08 kyranet

Originally, I thought of "locking" @discordjs/voice to use a specific opus library, but this can be done by the user itself. For example: Encode the audio to ogg/opus first then use inputType: "ogg/opus".

But an option to use a custom opus library or giving an option to the user to handle the opus library by itself is better, I don't know yet what the other use-cases for this are except locking down to a specific opus library or using a custom opus library.

Or is this already possible using getNode(StreamType).addEdge from TransformerGraph? I'm not that familiar with the codebase here, but I'll try to understand it.

Hazmi35 avatar Aug 19 '21 08:08 Hazmi35

This would be a limitation of prism-media, as it just picks the Opus library that offers the best performance from those that are installed. I'm not really sure why you'd want to override this behaviour? If you want to lock your bot to use a specific Opus library, you can make that Opus library a dependency of your project.

amishshah avatar Sep 11 '21 12:09 amishshah

Yes, sorry. The original idea was locking down to a specific opus library, but I changed my mind. The new idea was a way for users to pass a custom opus library.

Hazmi35 avatar Sep 11 '21 15:09 Hazmi35