luomo
luomo
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
i think i can't use it in the way u told me
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
@Qjuh
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'path' must be a string, Uint8Array, or URL without null bytes.
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
?
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
like that "readable = createReadStream(Buffer.from(ev.frame.data.buffer));"
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
right now? @Qjuh
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
const readable = fs.createReadStream(filepath);
callCharacter.output.on("frameReceived", ev => {
readable.push(Buffer.from(ev.frame.data.buffer));
readable.push(null)
});
player.play(createAudioResource(readable, {silencePaddingFrames: 5}));
const readable = fs.createReadStream(filepath);
callCharacter.output.on("frameReceived", ev => {
readable.push(Buffer.from(ev.frame.data.buffer));
readable.push(null)
});
player.play(createAudioResource(readable, {silencePaddingFrames: 5}));
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
ok, and for the method read()?
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
🫠
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
i have to write the push in it?
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
😭
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
how i create it help pls
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
@pat i tried but not works
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
const readable = new Readable({
read(){}
});
const player = createAudioPlayer();
connection.subscribe(player);

callCharacter.output.on("frameReceived", ev => {
readable.push(Buffer.from(ev.frame.data.buffer));
readable.push(null);
});

const resource = createAudioResource(readable, {silencePaddingFrames: 5});
player.play(resource);
const readable = new Readable({
read(){}
});
const player = createAudioPlayer();
connection.subscribe(player);

callCharacter.output.on("frameReceived", ev => {
readable.push(Buffer.from(ev.frame.data.buffer));
readable.push(null);
});

const resource = createAudioResource(readable, {silencePaddingFrames: 5});
player.play(resource);
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
or i need to increment it?
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
five is ok?
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
name?
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
what do u mean?
65 replies
DIdiscord.js - Imagine ❄
Created by luomo on 11/8/2024 in #djs-voice
i have an arraybuffer how can i trasform it to use in createAudioResource()?
since it runs it once and the readable is empty at that time it will not play the audio
65 replies