Closed betterclever closed 7 years ago
Update : I have setup most parts of the System on Arch Linux ARM. Having some problems setting up Microphone input. Working on it. Once complete, the compressed microSD image can be distributed as is (most probably) so that users don't have to go through hassle of installation of dependencies.
Update: After a lot of fiddling around with stuff, Microphone input is working with Alsa for Hotword Detection but there are some problems with Speech Recognition library while taking input (must be due to alsa, yet to find cause).
Logs:
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1735
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1902
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2166
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2835
Traceback (most recent call last):
File "main.py", line 89, in <module>
start_speech_recognition()
File "main.py", line 35, in start_speech_recognition
with m as source:
File "/usr/lib/python3.6/site-packages/speech_recognition/__init__.py", line 140, in __enter__
input=True, # stream is an input stream
File "/usr/lib/python3.6/site-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/pyaudio.py", line 441, in __init__
self._stream = pa.open(**arguments)
OSError: [Errno -9985] Device unavailable
Hardware Being used:
Update : I figured out problem was due to jack server. That was resolved, then I ran into a new problem of speech input getting hung in between. I was stuck on that, then I found this solution
Still, It is getting stuck. I am figuring that out. Will be done by tonight I suppose.
Update: Audio input is working fine independently right now after following this. Stereo Mic must improve performance. I was testing with a Webcam Microphone and it has some noise issue (when fans are on). I am yet to get it to work together with hotword detection, since mic has only one channel.
I think. best approach will be audio producer, -> consumer as implemented in MyCroft AI. here
Instructions were added to README.
The Susi AI prototype is capable of running on any linux system. We must provide instructions along with hardware requirements to make your own Amazon Echo like device running Susi AI.