'Discord js voice connection subscribe not detecting end event

let audioStream = connection.receiver.subscribe(message.member.user.id)
 audioStream.on('data' , (chunk) => {
   console.log(chunk)
 })
 connection.receiver.speaking.on('end', () => {
     console.log("ended")
 })

Why does it not detect the end event?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source