diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-07-29 19:44:10 -0700 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-07-29 19:44:10 -0700 |
| commit | 577d630ad2110fbde73008c2ba96f38319024334 (patch) | |
| tree | 8d231328bc461572e31572de3cf0a954199e9611 /client/mic.py | |
| parent | 526f86a138a2145c4342e76e2d7dd795f60013a7 (diff) | |
| download | jasper-client-577d630ad2110fbde73008c2ba96f38319024334.tar.gz jasper-client-577d630ad2110fbde73008c2ba96f38319024334.zip | |
Addressed CR comments.
Diffstat (limited to 'client/mic.py')
| -rw-r--r-- | client/mic.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/client/mic.py b/client/mic.py index 8d66053..b4ef668 100644 --- a/client/mic.py +++ b/client/mic.py @@ -180,7 +180,7 @@ class Mic: """ AUDIO_FILE = "active.wav" - RATE = 44100 + RATE = 16000 CHUNK = 1024 LISTEN_TIME = 12 @@ -241,10 +241,7 @@ class Mic: # DO SOME AMPLIFICATION # os.system("sox "+AUDIO_FILE+" temp.wav vol 20dB") - if MUSIC: - return self.active_stt_engine.transcribe(AUDIO_FILE, MUSIC=True) - - return self.active_stt_engine.transcribe(AUDIO_FILE) + return self.active_stt_engine.transcribe(AUDIO_FILE, MUSIC) def say(self, phrase, OPTIONS=" -vdefault+m3 -p 40 -s 160 --stdout > say.wav"): # alter phrase before speaking |
