I am trying to host a discord music bot in heroku, but even if it works fine in my local machine, it doesnt seem to be able to find the libopus library deployed.
He
I had similar problem. I don't know if it will work for you, but you can give it a try (when I tried to run it on my computer I got an error, but on Heroku it works perfect).
I added this to my script:
import ctypes
import ctypes.util
print("ctypes - Find opus:")
a = ctypes.util.find_library('opus')
print(a)
print("Discord - Load Opus:")
b = discord.opus.load_opus(a)
print(b)
print("Discord - Is loaded:")
c = discord.opus.is_loaded()
print(c)
Remember to put it before anything linked to audio (the best option is to paste it at the beginning).
Source