I am continuing the Matrix voice software issues on this new thread from the existing thread
The problems i am currently facing are
I reinstalled the OS and followed the hardware tests mentioned in the previous post . The hal everloop demo worked fine. Hence, i moved on to snowboy implementation. The sample demo.py ran without errors and started listening but no response. I tried both snowboy and Alexa models, shouted out the commands but no response. I went back to check just in case if everloop was working but it just throws error “can’t open any device”.
The installed packages were: kernel module,hal and malos
I installed malos even though snowboy wasn’t working just to check if i could try a mic example and somehow route the audio to snowboy but on first try , the everloop throwed error “Connected to error publisher with port 20023”. The test driver info script was able to print the output . The port for everloop mentioned is 20021 and the test_everloop_demo contains port as 20013+8. The malos readme file mentions only matrix creator. Is this same for matrix voice as well?
Not sure what python implementation for snowboy you are using. The one we currently maintain is this guide here that includes both Alexa and Snowboy wakeword engines in the installation. Here there has been a very productive discussion related to using that guide. This guide uses the C++ AVS SDK from Amazon, so is not in python.
MALOS is not required for the mics th=o work. The Matrix kernel already installed is all you need. Again, you were trying to use a snowboy code in python that I don’t know how it works.
Before i can proceed to snowboy. I wanted to clarify the reason for the instability of hal examples. The example executed during installation worked but not now and also the malos example . I just followed the steps for installation fo kernel modules and malos. I didn’t make any other changes except for snowboy . The same on creator works everytime when i test it but not on matrix voice . I think we should first fix this issue and then proceed to snowboy.
IT WORKS FINALLY… I checked the mv decoder file and i dont think there is much difference from snowdecoder_recorder is it ? and i think the other major think i missed was the mv_channels and mv_index which i gave as 0 and 2 respectively since my arecord result was like that. Could you let me know how you gave those values?
Glad you got it working! You are right. The only difference is setting no. of channels for matrix voice and its index position (MV_CHANNELS & MV_INDEX, in the code).
Snowboy accepts only 1 channel microphones. Whereas, Matrix Voice consists of 8 channels (since, 8 microphones). Hence, by setting MV_CHANNELS=1, we tell snowboy to use only one microphone.
Regarding MV_INDEX, it usually varies from RPi to RPi. You can get the index position using the arecord -l command. However, a nice way to list all the indices of playback devices as seen by PyAudio is by running this small, helpful code:
p = pyaudio.PyAudio()
info = p.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
for i in range(0, numdevices):
if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
print "Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name')
Hope this cleared your doubt. Have fun tinkering with your Matrix Voice!