Created
January 19, 2022 01:51
-
-
Save thepycoach/f034e797ed71c271340a25dfd9983b3b to your computer and use it in GitHub Desktop.
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 pyaudio | |
| FRAMES_PER_BUFFER = 3200 | |
| FORMAT = pyaudio.paInt16 | |
| CHANNELS = 1 | |
| RATE = 16000 | |
| p = pyaudio.PyAudio() | |
| # starts recording | |
| stream = p.open( | |
| format=FORMAT, | |
| channels=CHANNELS, | |
| rate=RATE, | |
| input=True, | |
| frames_per_buffer=FRAMES_PER_BUFFER | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment