How can I load opus into my project?
Anonymous
TRIALOP

3 years ago

15 Replies

Anonymous
TRIALOP

3 years ago

6d04a904-1f49-4e55-be45-0dca8015a046


albertpurnama
PRO

2 years ago

Hey there did you ever figure this out?

I'm having similar issue


albertpurnama
PRO

2 years ago

c3f5da0b-9d78-4b00-a90b-421597c1f517


2 years ago

what's opus


albertpurnama
PRO

2 years ago

I think it's an audio processing library


albertpurnama
PRO

2 years ago

I'm doing discord bot to process voice channel's input.


2 years ago

you think?


albertpurnama
PRO

2 years ago

Error stack:

ERROR:discord.ext.voice_recv.reader:Error processing rtp packet

Traceback (most recent call last):

File "/opt/venv/lib/python3.11/site-packages/discord/ext/voice_recv/reader.py", line 423, in callback

self.router.feed_rtp(_packet)

File "/opt/venv/lib/python3.11/site-packages/discord/ext/voice_recv/opus.py", line 77, in feed_rtp

decoder = self._get_decoder(packet.ssrc)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/opt/venv/lib/python3.11/site-packages/discord/ext/voice_recv/opus.py", line 72, in _get_decoder

decoder = self.decoders.setdefault(ssrc, PacketDecoder(self.sink, ssrc))

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/opt/venv/lib/python3.11/site-packages/discord/ext/voice_recv/opus.py", line 206, in __init__

self._decoder: Optional[Decoder] = None if sink.wants_opus() else Decoder()

^^^^^^^^^

File "/opt/venv/lib/python3.11/site-packages/discord/opus.py", line 420, in __init__

_OpusStruct.get_opus_version()

File "/opt/venv/lib/python3.11/site-packages/discord/opus.py", line 332, in get_opus_version

raise OpusNotLoaded()

2 years ago

how do you install opus?


albertpurnama
PRO

2 years ago

I don't know. I'm still trying to figure out why the script works locally, but not in Railway. This is currently the error stack.

I'm wondering opus is something natively installed in my computer but not in railway? But it shouldn't be if we're using virtualenv, right?


2 years ago

probably a system library


albertpurnama
PRO

2 years ago

sudo apt-get install libopus0

here's how to install it. can I add this to railway during build process? 🤔


albertpurnama
PRO

2 years ago


2 years ago

add a nixpacks.toml file to your project with this in it -

[phases.setup]
  aptPkgs = ['...', 'libopus0']

albertpurnama
PRO

2 years ago

trying it out..


Loading...