diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-26 17:27:25 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-26 17:27:25 +0200 |
| commit | 384b830f21ea2c9114e838aebd9222cfacfc6a31 (patch) | |
| tree | cd1ae7b29f70737106090f1b142351a918bac160 /client/mic.py | |
| parent | 9c99faa2a5b25eba9fbb27e344afab3d9f6f12b0 (diff) | |
| download | jasper-client-384b830f21ea2c9114e838aebd9222cfacfc6a31.tar.gz jasper-client-384b830f21ea2c9114e838aebd9222cfacfc6a31.zip | |
Close audio stream in fetchThreshold()
Diffstat (limited to 'client/mic.py')
| -rw-r--r-- | client/mic.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/mic.py b/client/mic.py index 0351592..444beea 100644 --- a/client/mic.py +++ b/client/mic.py @@ -68,6 +68,10 @@ class Mic: lastN.append(self.getScore(data)) average = sum(lastN) / len(lastN) + stream.stop_stream() + stream.close() + audio.terminate() + # this will be the benchmark to cause a disturbance over! THRESHOLD = average * THRESHOLD_MULTIPLIER |
