Closed optikkore closed 4 years ago
could you look at node/modules/pocketsphinx-continuous-node/index.js and tell me that this looks like
PocketSphinxContinuous.prototype.start = function() {
if (!this.isListening()) {
let mic = this.microphone;
// if name starts with number
if (this.microphone.match(/^\d/))
mic = `plughw:${this.microphone}`;
this._psc = spawn('pocketsphinx_continuous', [
'-adcdev',
mic,
and what did u specify in Lucy config , just "2,0".?
if the code looks like above, can u try "hw:2,0" in lucy config
when u used arecord before fixing .asoundrc how did u specify the -d parm? "hw:2,0" or "plughw:2,0"
pocketsphinx-continuous-node/index.js output
PocketSphinxContinuous.prototype.start = function() { if (!this.isListening()) { let mic=this.microphone; // if name starts with number if (this.microphone.match(/^\d/)) mic = 'plughw:'+this.microphone; this._psc = spawn('pocketsphinx_continuous', [ '-adcdev', mic,
"hw:2,0" same result
"plughw:2,0" same result
for the pi3b+ "2,0" showed error but responded to voice
when doing arecord -d "hw:2,0" -f S16_LE
.asoundrc ` pcm.!default { type asym playback.pcm { type plug slave.pcm "output" } capture.pcm { type plug slave.pcm "input" } }
pcm.input{ type hw card 2 device 0 format S16_LE }
pcm.output { type hw card 1 }
ctl.!default { type hw card 1 }
`
I even hardcoded it into pocketsphinx-continuous-node/index.js with same result
FIXED! with the way I setup my .asoundrc i just commented out mic and let it default to 'default' and it works! Sorry!!! @sdetweil @mykle1
Ahhh, I'm glad you guys worked it out. Sam, thanks for the troubleshooting. :-)
FIXED! with the way I setup my .asoundrc i just commented out mic and let it default to 'default' and it works! Sorry!!! @sdetweil @mykle1
Can you attach your .asoundrc I am having the same issue on Pi4, I also have a usb mic.
Please - I need to see what the "default" settings look like, as mine is not working either? I get a green, flashing mic with a line thought it. Outside MagicMirror the reporting and playback is working fine.
Thank you
@optikkore
@mirrormonark internet search is your friend. we don't control how the system accesses the mic or speakers. and they keep changing how they do it.. so... so much fun
try it out and let us know what you find.
arecord -l (lower case L for list)
will list the recordable input devices
aplay -l
will list the output devices
Thanks for the response. But I long time moved on from this project. I get it that poeple are busy - but I am getting older waiting for a response on these threats. If I cannot figure it out within a few weeks, I am not sitting around for 2yrs and 3months waiting on a response.
Thanks for your help.
@sdetweil I used the internet before writing. there are things for newbie not easy. it is funny that for every update everything changes .. before writing I looked at the posts about errors and tried.. but it happened that it broke the system and I had to do everything from scratch with the modules I like.. now I ask for help because I am not able to go ahead and google does not help me in the final step. I tried all the things arcord -l and aplay -l works... i hear the sound. but a funny thing is that when i have all my config the microphone becomes 3.0 while when i use the default config the microphone is at 1.0. but i can't move forward. from another i heard about an asoundrc folder but i can't find it, i tried creating it in the home folder but nothing. have a good day
@bert269 i understand well what you are saying... it would be easier if in the readme there is the solution you have various main cases and also maybe how to update by yourself.. so that you can create a fork and continue this community.. home assistant community is different.. the developers are present and even create a form for your requests besides teaching you things... apart from a couple of devs like @sdetweil and @mykle1 there are few who help you to make you understand how to move on the mirror for quest they are abandoning everyone. i had a group of 6 thousand Italian users.. now they write in 5 because they abandoned everyone.
please understand
we do this for ourselves, and share what we have done. there is NO commitment that we will maintain what we shared, ever.
mykle is away right now, dealing w a medical issue. I don't know if he will return to the forums.
I don't have the time currently to help you do the debug and analysis of the issue, so, like when I started, you will have to figure it out yourself or stop trying to use this module.
just for education, Linux does not have a hidden file attribute like windows, so by convention, any file or folder name that starts with a dot(.) will not be shown in any file listing unless additional parms/permissions are added to the command being used
ls vs ls -laF
Sorry if I didn't make myself clear. i meant to say precisely that you two at least help when you can, others who create the form don't even respond. Yes health is more important than anything in the world. can I ask you some questions?
if i start the default mirror with lucy the commands tell me "1,0" if i put my config with pages and other modules it tells me "3,0".
does the test plughw3,0 or hw3,0 go in the config or in the JS of the lucy module?
please understand
we do this for ourselves, and share what we have done. there is NO commitment that we will maintain what we shared, ever.
mykle is away right now, dealing w a medical issue. I don't know if he will return to the forums.
I don't have the time currently to help you do the debug and analysis of the issue, so, like when I started, you will have to figure it out yourself or stop trying to use this module.
just for education, Linux does not have a hidden file attribute like windows, so by convention, any file or folder name that starts with a dot(.) will not be shown in any file listing unless additional parms/permissions are added to the command being used
ls vs ls -laF
this with ls
MagicMirror $ ls CHANGELOG.md jest.config.js myAudioFile.mp3 tests clientonly jojo.wav node_modules test.wav Collaboration.md js package.json th.json config jsconfig.json package-lock.json translations css LICENSE.md photos vendor fonts luffy.wav README.md index.html modules serveronly installers module-types.ts splashscreen
i see with ls-laF the hide folder but i dont see .asoundrc
.asoundrc is in the user home folder, has nothing to do with MagicMirror,, we are just a USER of the system audio confiuration..
.asoundrc is in the user home folder, has nothing to do with MagicMirror,, we are just a USER of the system audio confiuration..
Since I can't find it inside the home folder (hidden files) I guess I have to create it. right? maybe have found the solution
i don't know.. they have kept changing to way sound is done.. I 'think' so.. you would have to research that ... I don't know if you need it if arecord/aplay work..
arecord and aplay work-that's what I didn't understand.... But I think I'm on the right track -- finding asoundrc I'll understand things better. I will try to create the asoundrc file if there are problems it could mean that there already exists that hidden file elsewhere... (postscript: i already searched for that file and folder as hidden file on the whole raspberry but it doesn't find it) that's why i think that's the solution.. but being a newbie i might have said something stupid
remember files with leading . (.asoundrc) are hidden from search unless u do something extra
searching the internet it turns out that audiopulse being by default deletes .asoundrc .. i have created the asoundrc file and am trying. the only thing i have figured out is that this the problem. if i can fix it, the module will work.
@sdetweil thanks master. i reset mm and i try installer mmm-voicecommander now i see clear .asoundrc (my stupid brain) but now i can listen my voice with microphone usb (another microphone) . when recording aplay test.wav Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono.. but after i cant listen nothing
arecord test.wav ctrl-c aplay test.wav
PI@PI:~/MagicMirror $ arecord test.wav Recording WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono ^CAborted by signal Interruzione... PI@PI:~/MagicMirror $ aplay test.wav Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
i change microphone and now i listen my voice with "unsigned 8 bit, rate 8000hz, mono"
Mic Constantly shows error arecord -l lists it as 2,0
config reflects that
arecord test.wav works
aplay test.wav works
tried USBFHD04H and HP Webcam HD 2300
same config on a Pi3B+ shows error but still responds to voice commands