snipsco / snips-record-personal-hotword Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
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
Hello
This scripts existing in Python 3 version please?
I executed script_recording.py and recorded my hotword. Snips generated folder with three wav files and config.json. After that I modified assistant.json when replaced "personal_hotword" with my "new_hotword" and copied model files to custom_hotword folder.
But when I run it on my android device I get next results in logcat:
`
02-26 13:06:50.274 8820-8836/ I/SnipsPlatform: Connecting to remote Snips processing service
02-26 13:06:50.354 8820-8820/ I/SnipsPlatform: Snips processing service connected, starting the platform
02-26 13:06:50.470 8820-8820/ E/SnipsPlatform: Snips processing service disconnected, attempting a reconnect
02-26 13:06:50.470 8820-8820/ D/SNIPS: Error: Remote service died
02-26 13:06:51.545 8820-8820/ I/SnipsPlatform: Snips processing service connected, starting the platform
02-26 13:06:51.668 8820-8820/ E/SnipsPlatform: Snips processing service disconnected, attempting a reconnect
02-26 13:06:51.668 8820-8820/D/SNIPS: Error: Remote service died
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.