We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import discord | |
| import threading | |
| import asyncio | |
| import time, math, random | |
| import sounddevice as sd #from https://python-sounddevice.readthedocs.io/en/0.3.14/ | |
| # Gets audio from the microphone | |
| class MicrophoneAudioSource(discord.PCMAudio): | |
| def __init__(self, duration_ms=20): | |
| self.SAMP_RATE_HZ = 48000.0 #48 KHz |