Comments (8)
Hi, regarding changing the sampling rate, Snowboy requires a specific sampling rate which you can see by calling the SampleRate() function. For now it's 16k. You can use different sampling rate for PyAudio, but when you feed the data to Snowboy detector, you will have to convert the data to 16k sampling rate.
As for the "Invalid sample rate" error, there's a long discussion in this thread. It might has something to do with pulseaudio. Some people mentioned that they were able to fix the issue by using a fresh installation of the OS. You can go through the thread to see what's the best fix.
Please do let us know if you end up with a nice solution to the issue!
from snowboy.
Ok, thanks for the update. For now I started new with a fresh image of Raspbian jesse. If I run into this issue there, I'll dig further. I was doing a lot with installing libraries and messing with the microphone, so maybe something got whacky in that.
from snowboy.
@nomadic-squirrel could you let me know if this was fixed eventually? If yes how did you fix it? Thanks!
from snowboy.
Yea, I just tested it. I still get the same ALSA warnings, then I get this output:
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Listening... Press Ctrl+C to exit
INFO:snowboy:Keyword 1 detected at time: 2016-08-05 18:27:15
And it will detect if I speak directly into the mic. I think I futzed around with my alsa settings and fubard something along the lines. This is a mostly fresh image with just the development libraries and snowboy installed.
So, not terribly helpful, sorry :(
from snowboy.
I've got similar error on Raspberry with the C++ sample.
Fail to open PortAudio stream, error message is "Invalid sample rate"
Listening... Press Ctrl+C to exit
and nothing works.
ALSA description of my microphone is:
Name = USB PnP Sound Device: Audio (hw:1,0)
Host API = ALSA
Max inputs = 1, Max outputs = 0
Default low input latency = 0.0087
Default low output latency = -1.0000
Default high input latency = 0.0348
Default high output latency = -1.0000
Default sample rate = 44100.00
Supported standard sample rates
for half-duplex 16 bit 1 channel input =
44100.00, 48000.00
from snowboy.
Snowboy requires a sample rate of 16k, it could be that the 16k sampling rate is not supported by your microphone. If you have other microphones by hand, you can give them a try.
from snowboy.
I am having the same invalid sample rate issue, The sample rate support by my USB mic is 44100. So where and how should I set the sample rate?
from snowboy.
@sriranjanr There are usually two options:
-
Try another microphone
-
Try the arecord demo: https://github.com/Kitt-AI/snowboy/blob/master/examples/Python/demo_arecord.py
from snowboy.
Related Issues (20)
- Why not open source the main library? HOT 5
- How do i make a model without kitt-ai's site? HOT 1
- documentation? HOT 1
- fichier umdl + documentation
- I run demo on my device,I got a crash
- cant patch avs-kittai.patch to pi.sh and setup.sh HOT 2
- 安装到最后后端进不去 HOT 1
- snowboy issue HOT 1
- support for arm64 ubuntu 20.04 ? HOT 1
- issues while rebuilding snowboy on MMM-awesome-alexa
- /node_modules/.bin/electron-rebuild fails with weird errors
- Website down? HOT 1
- Make it available for windows!!!!!!! HOT 1
- Depencies not updated in documentation for latest Ubuntu versions.
- snowboy不支持 rsicv 架构 HOT 1
- Did you change `examples/Python/snowboydetect.py` by any chance? That file was generated by swig automatically and the first line is not `../../swig/Python/snowboydetect.py`. Your error message seems to suggest that the first line is `../../swig/Python/snowboydetect.py` HOT 2
- make -C arch64-ubuntu1604 libsnowboy-detect.a make[1]: *** arch64-ubuntu1604: No such file or directory. Stop. make: *** [Makefile:67: arch64-ubuntu1604/libsnowboy-detect.a] Error 2
- 不知道啥原因
- ../..//lib/ubuntu64/libsnowboy-detect.a : error adding symbols: file format not recognized
- makefile有问题 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snowboy.