sharedconfig.py 506 B

12345678910111213141516171819202122232425
  1. import sys
  2. import numpy as np
  3. FS=16000
  4. NBCHANNELS=1 # stereo
  5. # You can try with 120
  6. AUDIO_INTERRUPT_LENGTH = 192
  7. # MFCC Description
  8. sample_rate = 16000
  9. FFTSize = 256
  10. numOfDctOutputs = 13
  11. freq_min = 64
  12. freq_high = sample_rate / 2
  13. numOfMelFilters = 20
  14. # NB MFCC Outputs to cover one second of signal with the window overlap
  15. nbMFCCOutputs = int(np.floor(sample_rate / (FFTSize >> 1)))
  16. if nbMFCCOutputs%2 == 1:
  17. nbMFCCOutputs = nbMFCCOutputs + 1
  18. print("nbMFCCOutputs = %d " % nbMFCCOutputs)