High frequency cause "index out of bounds"
construidor opened this issue · 1 comments
construidor commented
If the frequency in "options.py" is bigger then 21736, the following error appears in "listen.py":
$ python2 listen.py
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "listen.py", line 39, in process_frames
point = quietnet.has_freq(fft, search_freq, rate, chunk)
File "/home/construidor/src/quietnet/quietnet.py", line 28, in has_freq
if top < np.average([fft_sample[peak-offset], fft_sample[peak+offset]]):
IndexError: index out of bounds