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 | --------------------------------------------------
4 Replies
d.js toolkit
d.js toolkit3mo ago
- What are your intents? GuildVoiceStates is required to receive voice data! - Show what dependencies you are using -- generateDependencyReport() is exported from @discordjs/voice. - Try looking at common examples: https://github.com/discordjs/voice-examples. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Redmega
RedmegaOP3mo ago
I converted to mp3 and it works fine
pat
pat3mo ago
are you sure that the source file is ogg with a opus codec i.e. does StreamType.Ogg work? what if you leave it blank ? (it will automatically infer type) @Redmega
Redmega
RedmegaOP3mo ago
Hmm lets see I downloaded it straight from the discord soundboard Oh interesting so as an ogg with inferred type it also works fine So I guess the ogg that discord outputs doesn't use the opus codec
Want results from more Discord servers?
Add your server