04-17-2019, 03:11 AM
@chbla
Curiosity got the better of me. I went off and read the material available on snips.ai. Based on that, I have to walk back some of my early remarks---it looks like making a snips assistant similar to, say, Alexa would be easier than I thought.
So, I set up the snips command interface on my laptop and installed the snips platform on a moOde r5.0 player/RPi3A+. This test installation has a Plantronics USB gaming headset plugged in and selected as the MPD audio device.
I see the same stream of error messages on the RPi that you reported. It appears from them that the snips platform runs through a number of guesses of possible ALSA device names. I can't comment on that or on any other aspect of the snips' usage of ALSA because I couldn't find any documentation of the core snips platform.
So, I just went ahead and ran "snips setup audio":
Snips automatically selected the headset's microphone because that's the only capture device present. It offered me a selection of three ALSA devices for the speaker: the first corresponds to the RPi onboard audio jack, the second to the RPi onboard HDMI output, and the third to the USB headset.
1) as you can see in the code block above, I selected the USB headset. As a result, sam wrote a /etc/asound.conf file to the RPi containing my choices.
Running "sam test speaker" and "sam test microphone" didn't result in me hearing anything other than the moOde selection already playing on the headset.
2) Then I reran "sam setup audio" and selected the RPi onboard audio jack as the speaker, and plugged a set of earbuds into it. As a result, the /etc/asound.conf file got updated.
Now "sam test speaker" continuously plays the prerecorded "front left, front right" through the earbuds----while moOde is playing through the USB headset. Similarly, running "sam test microphone" results in my spoken test phrase being played through the earbuds.
What I've seen so far suggests to me that you don't have to do nearly as much hard work as I was prophesying earlier. My test #1, though, shows there is a bit of work to be done yet. I believe the microphone input actually was being captured but the test output wasn't making it to the USB headset because of a clash between snips.ai and moOde/MPD ALSA usage.
This is all I'm going to do for now. If I can get some time to play with snips.ai some more, I may try creating an assistant as an voice-activated version of the popular moOde LIRC controller. Just for fun.
Regards,
Kent
Curiosity got the better of me. I went off and read the material available on snips.ai. Based on that, I have to walk back some of my early remarks---it looks like making a snips assistant similar to, say, Alexa would be easier than I thought.
So, I set up the snips command interface on my laptop and installed the snips platform on a moOde r5.0 player/RPi3A+. This test installation has a Plantronics USB gaming headset plugged in and selected as the MPD audio device.
I see the same stream of error messages on the RPi that you reported. It appears from them that the snips platform runs through a number of guesses of possible ALSA device names. I can't comment on that or on any other aspect of the snips' usage of ALSA because I couldn't find any documentation of the core snips platform.
So, I just went ahead and ran "snips setup audio":
Quote:kreed@T520 ~ $ sam setup audio
? Is it a Snips Makers Kit? No
✔ Found only 1 capture device named: card 1: DSP [Plantronics .Audio 655 DSP], device 0: USB Audio [USB Audio]
i Using this device to capture sound
? Found 3 interfaces to output sound.
Choose the one you want to use as your speaker card 1: DSP [Plantronics .Audio
655 DSP], device 0: USB Audio [USB Audio]
✔ Installed /etc/asound.conf
Snips automatically selected the headset's microphone because that's the only capture device present. It offered me a selection of three ALSA devices for the speaker: the first corresponds to the RPi onboard audio jack, the second to the RPi onboard HDMI output, and the third to the USB headset.
1) as you can see in the code block above, I selected the USB headset. As a result, sam wrote a /etc/asound.conf file to the RPi containing my choices.
Running "sam test speaker" and "sam test microphone" didn't result in me hearing anything other than the moOde selection already playing on the headset.
2) Then I reran "sam setup audio" and selected the RPi onboard audio jack as the speaker, and plugged a set of earbuds into it. As a result, the /etc/asound.conf file got updated.
Now "sam test speaker" continuously plays the prerecorded "front left, front right" through the earbuds----while moOde is playing through the USB headset. Similarly, running "sam test microphone" results in my spoken test phrase being played through the earbuds.
What I've seen so far suggests to me that you don't have to do nearly as much hard work as I was prophesying earlier. My test #1, though, shows there is a bit of work to be done yet. I believe the microphone input actually was being captured but the test output wasn't making it to the USB headset because of a clash between snips.ai and moOde/MPD ALSA usage.
This is all I'm going to do for now. If I can get some time to play with snips.ai some more, I may try creating an assistant as an voice-activated version of the popular moOde LIRC controller. Just for fun.
Regards,
Kent