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
    
  
  
    
  | #!/usr/bin/env python | |
| import pyaudio | |
| from numpy import zeros,linspace,short,fromstring,hstack,transpose,log | |
| from scipy import fft | |
| from time import sleep | |
| #Volume Sensitivity, 0.05: Extremely Sensitive, may give false alarms | |
| # 0.1: Probably Ideal volume | |
| # 1: Poorly sensitive, will only go off for relatively loud | |
| SENSITIVITY= 1.0 | 
  
    
      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 | |
| import wave | |
| FORMAT = pyaudio.paInt16 | |
| CHANNELS = 2 | |
| RATE = 44100 | |
| CHUNK = 1024 | |
| RECORD_SECONDS = 5 | |
| WAVE_OUTPUT_FILENAME = "file.wav" | |