You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't get the script running as of an invalid sample rate.
Traceback (most recent call last): File "script_recording.py", line 143, in <module> record_and_trim(args.hotword_key) File "script_recording.py", line 80, in record_and_trim record_one(directory, i) File "script_recording.py", line 40, in record_one frames_per_buffer=CHUNK, input_device_index=2) File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 750, in open stream = Stream(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 441, in __init__ self._stream = pa.open(**arguments) IOError: [Errno -9997] Invalid sample rate
I tried to change the sample rate to the default sample rate of my mic (44100) and the it worked and I was able to record the wake word. Unfortunately then I get the following issue when trying to start snips using the key word:
`[13:36:10.156829] ERROR:snips_hotword: Expected wav in form: WavSpec { channels: 1, sample_rate: 16000, bits_per_sample: 16, sample_format: Int } got: WavSpec { channels: 1, sample_rate: 44100, bits_per_sample: 16, sample_format: Int }
So it seems that snips is expecting a sample rate of 16000. What can I do to make it work? Can I somehow convert the sample rate of my mic to make it work with the script? How can I do that? I am running Raspberry 3 B+ with Stretch.
Thanks and best regards
Daniel
The text was updated successfully, but these errors were encountered:
Hi there,
I can't get the script running as of an invalid sample rate.
Traceback (most recent call last): File "script_recording.py", line 143, in <module> record_and_trim(args.hotword_key) File "script_recording.py", line 80, in record_and_trim record_one(directory, i) File "script_recording.py", line 40, in record_one frames_per_buffer=CHUNK, input_device_index=2) File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 750, in open stream = Stream(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 441, in __init__ self._stream = pa.open(**arguments) IOError: [Errno -9997] Invalid sample rate
I tried to change the sample rate to the default sample rate of my mic (44100) and the it worked and I was able to record the wake word. Unfortunately then I get the following issue when trying to start snips using the key word:
`[13:36:10.156829] ERROR:snips_hotword: Expected wav in form: WavSpec { channels: 1, sample_rate: 16000, bits_per_sample: 16, sample_format: Int } got: WavSpec { channels: 1, sample_rate: 44100, bits_per_sample: 16, sample_format: Int }
[13:36:10.156877] ERROR:rumqtt::client: a06227beece44aa19e8d0bdd677df32a Disconnected: (Error(SyncMpsc(Disconnected), State { next_error: None, backtrace: None }))`
So it seems that snips is expecting a sample rate of 16000. What can I do to make it work? Can I somehow convert the sample rate of my mic to make it work with the script? How can I do that? I am running Raspberry 3 B+ with Stretch.
Thanks and best regards
Daniel
The text was updated successfully, but these errors were encountered: