Redmega
Redmega
DIAdiscord.js - Imagine an app
Created by Redmega on 9/13/2024 in #djs-voice
Bot plays audio sped up
const player = createAudioPlayer();
const connection = joinVoiceChannel({
channelId: channel!.id,
guildId: guild.id,
adapterCreator: oldState.guild.voiceAdapterCreator,
});
await entersState(connection, VoiceConnectionStatus.Ready, 10000);
connection.subscribe(player);

const sound = createAudioResource(createReadStream(path.join(__dirname, "../..", "byebye.ogg")), {
inputType: StreamType.OggOpus,
});

player.play(sound);
await entersState(player, AudioPlayerStatus.Idle, 10000);
connection.destroy();
const player = createAudioPlayer();
const connection = joinVoiceChannel({
channelId: channel!.id,
guildId: guild.id,
adapterCreator: oldState.guild.voiceAdapterCreator,
});
await entersState(connection, VoiceConnectionStatus.Ready, 10000);
connection.subscribe(player);

const sound = createAudioResource(createReadStream(path.join(__dirname, "../..", "byebye.ogg")), {
inputType: StreamType.OggOpus,
});

player.play(sound);
await entersState(player, AudioPlayerStatus.Idle, 10000);
connection.destroy();
The audio file plays fine on the computer. On the server it seems sped up at least 2x or 3x.
edward-cullen-bot-1 | --------------------------------------------------
edward-cullen-bot-1 | Core Dependencies
edward-cullen-bot-1 | - @discordjs/voice: 0.17.0
edward-cullen-bot-1 | - prism-media: 1.3.5
edward-cullen-bot-1 |
edward-cullen-bot-1 |
edward-cullen-bot-1 | Opus Libraries
edward-cullen-bot-1 | - @discordjs/opus: 0.9.0
edward-cullen-bot-1 | - opusscript: not found
edward-cullen-bot-1 |
edward-cullen-bot-1 |
edward-cullen-bot-1 | Encryption Libraries
edward-cullen-bot-1 | - sodium-native: not found
edward-cullen-bot-1 | - sodium: not found
edward-cullen-bot-1 | - libsodium-wrappers: 0.7.15
edward-cullen-bot-1 | - tweetnacl: not found
edward-cullen-bot-1 |
edward-cullen-bot-1 |
edward-cullen-bot-1 | FFmpeg
edward-cullen-bot-1 | - version: 6.1.1
edward-cullen-bot-1 | - libopus: yes
edward-cullen-bot-1 | --------------------------------------------------
edward-cullen-bot-1 | --------------------------------------------------
edward-cullen-bot-1 | Core Dependencies
edward-cullen-bot-1 | - @discordjs/voice: 0.17.0
edward-cullen-bot-1 | - prism-media: 1.3.5
edward-cullen-bot-1 |
edward-cullen-bot-1 |
edward-cullen-bot-1 | Opus Libraries
edward-cullen-bot-1 | - @discordjs/opus: 0.9.0
edward-cullen-bot-1 | - opusscript: not found
edward-cullen-bot-1 |
edward-cullen-bot-1 |
edward-cullen-bot-1 | Encryption Libraries
edward-cullen-bot-1 | - sodium-native: not found
edward-cullen-bot-1 | - sodium: not found
edward-cullen-bot-1 | - libsodium-wrappers: 0.7.15
edward-cullen-bot-1 | - tweetnacl: not found
edward-cullen-bot-1 |
edward-cullen-bot-1 |
edward-cullen-bot-1 | FFmpeg
edward-cullen-bot-1 | - version: 6.1.1
edward-cullen-bot-1 | - libopus: yes
edward-cullen-bot-1 | --------------------------------------------------
10 replies