TL;DR Sound recorded on my picroft with jabra 410 usb microphone is hilariously compressed into a tiny squeak. Please help.
15 sec and SFW video here
https://drive.google.com/open?id=1Kacbt5ZZNdmvo3pLBbubGp7fp351TUM0
Long Story. When first booting my new picroft, this type of thing didn’t produce any sound
speak "hello"
mimic -t "Hello. my name is Mycroft." -o hello.wav
aplay hello.wav
However after some googling I discovered this did work!
aplay -Dplughw:1,0 hello.wav
So I promptly edited my mycroft.conf
pi@picroft:~ $ cat /etc/mycroft/mycroft.conf
{
"play_wav_cmdline": "aplay -Dplughw:1,0 %1",
"play_mp3_cmdline": "mpg123 -a plughw:1,0 %1",
"enclosure": {
"platform": "picroft",
"update": true,
"test": false
},
"tts": {
"module": "mimic",
"mimic": {
"voice": "ap",
"path": "/usr/local/bin/mimic"
}
},
"ipc_path": "/ramdisk/mycroft/ipc/"
}
But this didn’t help anything, and I’m thinking it was actualy the wrong thing to do.
Moving on…
I found some more resources with googlefoo, and this worked!
pi@picroft:~ $ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 29
Server Protocol Version: 29
Is Local: yes
Client Index: 22
Tile Size: 65496
User Name: pi
Host Name: picroft
Server Name: pulseaudio
Server Version: 5.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.0.analog-stereo
Default Source: alsa_input.usb-0b0e_Jabra_SPEAK_410_USB_501AA5D84A75x010900-00-USB.analog-mono
Cookie: a36b:f296
pi@picroft:~ $ pactl set-default-sink 0
pi@picroft:~ $ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 29
Server Protocol Version: 29
Is Local: yes
Client Index: 25
Tile Size: 65496
User Name: pi
Host Name: picroft
Server Name: pulseaudio
Server Version: 5.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.usb-0b0e_Jabra_SPEAK_410_USB_501AA5D84A75x010900-00-USB.analog-stereo
Default Source: alsa_input.usb-0b0e_Jabra_SPEAK_410_USB_501AA5D84A75x010900-00-USB.analog-mono
Cookie: a36b:f296
pi@picroft:~ $ aplay hello.wav
Playing WAVE 'hello.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
pi@picroft:~ $ mimic -t "Hello. my name is Mycroft." -o hello.wav
Horay! I have sound. I suspect I should go back and put mycroft.conf back to default.
Now I’m left with the very odd problem of the microphone recording as in the video
https://drive.google.com/open?id=1Kacbt5ZZNdmvo3pLBbubGp7fp351TUM0
I think it’s the recording at fault, not the playback, because I can play other audio fine, and I have no wakeword detection (hey mycroft).
Any pointers you can give would be great. I’ve attached the output from aplay -L and arecord -L for details.
pi@picroft:~ $ aplay -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
dmix:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample mixing device
dmix:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample snooping device
hw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Hardware device with all software conversions
sysdefault:CARD=USB
Jabra SPEAK 410 USB, USB Audio
Default Audio Device
front:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Front speakers
surround21:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Direct sample mixing device
dsnoop:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Direct sample snooping device
hw:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Direct hardware device without any conversions
plughw:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Hardware device with all software conversions
pi@picroft:~ $ arecord -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=USB
Jabra SPEAK 410 USB, USB Audio
Default Audio Device
front:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Front speakers
surround21:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Direct sample mixing device
dsnoop:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Direct sample snooping device
hw:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Direct hardware device without any conversions
plughw:CARD=USB,DEV=0
Jabra SPEAK 410 USB, USB Audio
Hardware device with all software conversions
pi@picroft:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: USB [Jabra SPEAK 410 USB], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
pi@picroft:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: USB [Jabra SPEAK 410 USB], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0