#I'm trying to play audio from stream
1 messages · Page 1 of 1 (latest)
Hey! Once your issue is solved, press the button below to close this thread!
Hi!
Let's manually install the dependency
run pip install PyNaCl
Once you have done that, that error should go away if it was related to the deps missing
I was able to use that url you have provided to successfully play music
from interactions import Client, listen, slash_command, events, InteractionContext
from interactions.api.voice.audio import AudioVolume
bot = Client(
debug_scope=780435741650059264,
delete_unused_application_cmds=True,
)
@slash_command(name="play", description="Play a song")
async def play(ctx: InteractionContext):
vc = ctx.author.voice.channel
voice_state = await vc.connect()
audio_source = AudioVolume("https://emisja.radio17.pl/stream")
await voice_state.play(audio_source)
bot.start("token")
the error is because you dont have opus installed, nothing to do with pynacl
(pynacl is a libsodium fork which handles cryptography and networking, opus handles audio en/de coding)
what os are you using, @mortal pewter
I've got PyNaCl installed, so it's not this.
Windows for development but it will run on Linux after I finish migrating from NAFF.
huh, we package opus with the library for windows
I can try nuking my venv later today and reinstalling the whole lib.
if you could, as i can see opus in the lib rn
ah i see the issue
its not being packaged in the pypi release
fixed
thatll be resolved in the next pypi release
Ty for quick fix/response.