These are my setup notes on how to quickly get a Picrofy system up and running using a speaker plugged into the headphone jack and a generic USB mic.
Write the image to the sdcard as instructed
Setup picroft with the wizard. a. The options I select: Output: Speakers via 3.5 Mic: Other - Unsupported b. Tests will most likely fail at this stage, this is expected
Once you get to the mycroft-cli and register your device, it’s time to apply some updates. a. Update package list $ sudo apt update b. Upgrade Packages $ sudo apt upgrade -y c. Remove unused packages $ sudo apt autoremove -y d. Reboot $ sudo reboot
When things boot back up, it’s time to get the audio working. I usually do this via SSH. a. Review default audio devices $ pactl info b. Set the default output device to the headphone jack $ pactl set-default-sink alsa_output.platform-bcm2835_audio.analog-stereo c. Verify that the correct default devices are set $ pactl info d. Tell MyCroft to use the pulse system by default $ mycroft-config set listener.device_name "pulse" e. Reboot $ sudo reboot
Update the /etc/mycroft/mycroft.conf a. Update the following lines: "play_wav_cmdline": "aplay -Dhw:0,0 %1", "play_mp3_cmdline": "mpg123 -a hw:0,0 %1", b. To look like this: "play_wav_cmdline": "aplay %1", "play_mp3_cmdline": "mpg123 %1",
Update the DuckDuckGo skill $ msm install https://github.com/JarbasSkills/skill-ddg
When the system is back online, run a mycroft-mic-test $ mycroft-mic-test
Notes
Set mic gain to 100% (I’ve got a crappy mic) $ amixer set Capture 100%
Check alsamixer to make sure all audio levels are up
Change listen engine to Precise
> Hey Mycroft, tell me what Listener you are using
> Hey Mycroft, set the Listener to Precise
Hey, thanks for sharing all these learnings. I’ve been doing a little work to switch all the old ALSA manipulation to use pulseaudio instead and it includes a bunch of these suggestions.
Sets input and output devices as default devices in PA
Provides a new selection menu for non-standard devices using the output of pactl info list sinks/sources short
Set volume using PA
As the devices are now set as defaults, we no longer need to set custom play_type_cmdline settings for each device, hence these mycroft.conf settings have been removed.
Simplifies the speak function as Mimic can now output audio directly, reducing chance of tmp file issues
Gez. is there a set of commits that we can take a look at that represents this work? FWIW, I only ask because I’d like to follow along with changes to the installer without necessarily running it each time.