-
Notifications
You must be signed in to change notification settings - Fork 8
What is the correct ALSA setting? #24
Comments
As I wrote in Wiki,
Because there could be many reasons for not working sound system. I cannot guess which is the real problem. Well, sometimes I failed even in my own systems... :( I'm not an expert of that kind. |
Problem is that I'm able to play but I have no idea how the MMM-Assistant is using the sound devices. |
It means this device is not configured as DEFAULT device, so
doesn't work. And you have another options to use |
@eouia Hi, yeah, I'm working on this now. # arecord -d 10 zz.wav && aplay zz.wav
Recording WAVE 'zz.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
Playing WAVE 'zz.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono But the default bitrate is very low, giving a very crappy recording. Using # rec zz1.wav && aplay zz1.wav
Input File : 'default' (alsa)
Channels : 2
Sample Rate : 48000
Precision : 16-bit
Sample Encoding: 16-bit Signed Integer PCM
In:0.00% 00:00:14.08 [00:00:00.00] Out:672k [ | ] Clip:0 ^C
Aborted.
Playing WAVE 'zz1.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo |
Hey @eouia Ok here is the lowdown.
NOTE:
# aplay -l && arecord -l
**** List of PLAYBACK Hardware Devices ****
card 1: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
**** List of CAPTURE Hardware Devices ****
card 1: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
# cat /proc/asound/modules
1 snd_usb_audio
# cat /proc/asound/cards
1 [Set ]: USB-Audio - C-Media USB Headphone Set
C-Media USB Headphone Set at usb-3f980000.usb-1.5, full speed Next, as I said above, {
module: 'MMM-Assistant',
position: 'bottom_left',
config: {
assistant: {
auth: {
keyFilePath: "secret.json", // REQUIRED (Google Assistant API) -- OAuth2 x509 cert
savedTokensPath: "resources/tokens.js" // REQUIRED (Google Assitant API) -- accesss_token & refresh_token
},
audio: {
encodingIn: "LINEAR16", // Default. No need to change.
sampleRateOut: 16000 // Default. No need to change.
}
},
snowboy: {
models: [
{
file: "resources/smart_mirror.umdl", // This file define your MM wake word. (See doc notes.)
sensitivity: 0.5,
hotwords : "MIRROR" // Default model: "MIRROR". (This is not the wake word!)
},
{
file: "resources/snowboy.umdl", // This file define your GA wake word. (See doc notes.)
sensitivity: 0.5,
hotwords : "ASSISTANT" // Default model: "ASSISTANT". (This is not the wake word!)
}
]
},
record: {
threshold: 0, // Default. No need to change.
verbose:false, // Deafult: true -- for checking recording status.
recordProgram: 'rec', // You can use 'rec', 'sox', but we recommend 'arecord'
silence: 2.0 // Default. No need to change.
},
stt: {
auth: [{ // You can use multiple accounts to save money
projectId:'mmm-xx', // REQUIRED (Google Voice API) -- project_id
keyFilename: 'MMM-XX-aaaabbbbcccc.json' // REQUIRED (Google Voice API) -- service_account / private_key
}],
request: {
encoding: 'LINEAR16', // Default. No need to change.
sampleRateHertz: 16000, // Default. No need to change.
languageCode: 'en-US' // [en-US] To set the default GA speech request language.
// (See: https://cloud.google.com/speech/docs/languages)
},
},
speak: {
useAlert: true, // [true] Enable this to show the understood text of your speech
language: 'en-US', // [en-US] To set the default GA speech reply language.
},
alias: [ // You can use aliases for difficult pronunciation or easy using.
{
"help :command" : ["teach me :command", "what is :command"]
}
]
}
}, Then run MM with PM2 normally. To see the result of your voice input, follow the pm2 log files in a terminal with this: # put this in your .bashrc for easy use
alias tailo='tail -f ~/.pm2/logs/mm-out-0.log'
tailo
... Note, the wake words are Next, I discovered a bug that freezes the Assistant module. See issue #25. |
In the Wiki:
That fails with:
So then I tried with:
Since I only have an ALSA in
~/.asoundrc
, I guess MM never see my settings or they are not right.What are the settings you have?
The text was updated successfully, but these errors were encountered: