althruist
althruist
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
thanks for the help! :)
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
i went ahead and utilized it
async function fetchAudioResource(url) {
const response = await fetch(url);
if (!response.ok) throw new Error(`Failed to fetch audio: ${response.statusText}`);

// Convert the response body to an ArrayBuffer
const arrayBuffer = await response.arrayBuffer();

// Create a ReadableStream from the ArrayBuffer
const readableStream = new ReadableStream({
start(controller) {
controller.enqueue(new Uint8Array(arrayBuffer));
controller.close();
}
});

// Create a resource from the ReadableStream
const resource = createAudioResource(readableStream, { inputType: StreamType.Arbitrary });
return resource;
}
async function fetchAudioResource(url) {
const response = await fetch(url);
if (!response.ok) throw new Error(`Failed to fetch audio: ${response.statusText}`);

// Convert the response body to an ArrayBuffer
const arrayBuffer = await response.arrayBuffer();

// Create a ReadableStream from the ArrayBuffer
const readableStream = new ReadableStream({
start(controller) {
controller.enqueue(new Uint8Array(arrayBuffer));
controller.close();
}
});

// Create a resource from the ReadableStream
const resource = createAudioResource(readableStream, { inputType: StreamType.Arbitrary });
return resource;
}
-# honestly i did use AI for help because it's late and my head can't wrap around it all that well 🥲 it still seems to be a bit choppy but it's better. it might be my internet since for whatever reason my laptop handles my internet poorly
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
i see, ill do my research on that!
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
how do i go about that?
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
its working now but it's verrrry choppy..??
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
it just- started playing. half way through the song
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
OH
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
uhh... dunno. it did though LOL
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
No description
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
i tried doing some research about it, there was an old workaround for it but it seems that it used to be a bug that got patched. im not sure what's going on
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
nothing
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
i haven't, let me try
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
status autopaused???
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
i got this
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
No description
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
okay i will try!
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
okay!
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
or libopus?
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
i see so, remove inlinevolume?
33 replies
DIAdiscord.js - Imagine an app
Created by althruist on 1/1/2025 in #djs-voice
Audio not playing despite properly retrieving URL to audio. No errors.
i think its because i installed libopus as i was trying to debug it
33 replies