Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

184
Views
Is it possible to alter an audio stream using discord.js

I just want to be able to change the pitch, bass, speed and possibly volume when playing music through my bot.

I have looked at using ffmeg and modifying the datastream so help on that would also be nice.

playDl.stream(musicQueue[0]).then((value) => {
    music = {
        "url": musicQueue[0],
        "resource": discordVoice.createAudioResource(value.stream, {inputType: value.type, inlineVolume: true}),
        "player": discordVoice.createAudioPlayer({behaviors: {noSubscriber: discordVoice.NoSubscriberBehavior.Play}}),
        "connection": discordVoice.joinVoiceChannel({
            channelId: message.member.voice.channelId,
            guildId: message.channel.guild.id,
            adapterCreator: message.channel.guild.voiceAdapterCreator
        })
    }
    const current = music;
    music["player"].play(music["resource"]);
    music["connection"].subscribe(music["player"]);
    music["player"].on(discordVoice.AudioPlayerStatus.Idle, () => {
        if (!(current["connection"].state.status == "disconnected" || current["connection"].state.status == "destroyed")) {
            if (musicLoop == true) {
                musicQueue.push(music["url"]);
            }
            commands["resume"]["method"](message);
        }
    });
    musicQueue.shift();
    message.channel.send("Resumed playing music");
})
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!