Skip to content

Bump @discordjs/voice from 0.5.6 to 0.6.0

Wolf Yuan requested to merge dependabot/npm_and_yarn/discordjs/voice-0.6.0 into main

Created by: dependabot[bot]

Bumps @discordjs/voice from 0.5.6 to 0.6.0.

Release notes

Sourced from @​discordjs/voice's releases.

v0.6.0

Voice Receive

v0.6.0 makes voice receive useable with many utility additions. You can see a run-down below, or view the full recorder example.

Audio receive streams automatically close when their attached voice connection is destroyed.

// Join with selfDeaf set to false to receive audio
const voiceConnection = joinChannel({ ...options, selfDeaf: false });
voiceConnection.receiver.speaking.on('start', userId => console.log(User ${userId} started speaking));
voiceConnection.receiver.speaking.on('end', userId => console.log(User ${userId} stopped speaking));
// A Readable object mode stream of Opus packets
// Will only end when the voice connection is destroyed
voiceConnection.receiver.subscribe(userId);
// A Readable object mode stream of Opus packets
// Will end when the voice connection is destroyed, or the user has not said anything for 100ms
const opusStream = voiceConnection.receiver.subscribe(userId, {
end: {
behavior: EndBehaviorType.AfterSilence,
duration: 100,
},
});
// -------------------------
// You can re-use the Opus stream, e.g. to play in another channel as an echo
const resource = createAudioResource(opusStream, { inputType: StreamType.Opus });
// You can decode the Opus stream to raw audio using prism-media
const rawAudio = opusStream.pipe(new prism.opus.Decoder({ frameSize: 960, channels: 2, rate: 48000 }));
// You can save the stream to an Ogg file using prism-media@2.0.0-alpha.0
const oggWriter = new opus.OggLogicalBitstream({
opusHead: new opus.OpusHead({
channelCount: 2,
sampleRate: 48000,
}),
pageSizeControl: {
maxPackets: 10,
},
});
pipeline(opusStream, oggWriter, createWriteStream('./myfile.ogg'), callback);

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Merge request reports