Added noisegate to the 'sound' file and integrated it with its function

This commit is contained in:
Logan Cusano
2022-03-26 01:35:02 -04:00
parent 12aa4d6f51
commit 465c0e00ea
2 changed files with 32 additions and 8 deletions

6
bot.py
View File

@@ -95,13 +95,11 @@ class Bot(commands.Bot):
voice_connection = await channel.connect()
# Create an audio stream from selected device
self.streamHandler = sound.PCMStream(self.DEVICE_ID)
self.streamHandler = sound.PCMStream(self.DEVICE_ID, voice_connection)
# Start the audio stream
await self.streamHandler.play()
# Play the stream
voice_connection.play(discord.PCMAudio(self.streamHandler))
# Start the SDR and begin playing to the audio stream
self.start_sdr()