• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Hello-Lucy + RaspPi Bullseye + MM v2.18 + USB Mic

Scheduled Pinned Locked Moved Unsolved Troubleshooting
4 Posts 2 Posters 538 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    crazylegs
    last edited by Apr 11, 2022, 12:41 AM

    Hello Forum… I wonder if someone could smack me in the head to make me see where I am going wrong.

    I have been running MM v2.15 on RaspPi Buster for quite awhile, and part of that build is using Hello-Lucy with a PS Eye USB mic. This works just fine for me.

    I decided to do a full rebuild of my system on RaspPi Bullseye and MM v2.18. Everything on this build works fine except Hello-Lucy. Basically, Hello-Lucy is having trouble opening the PS Eye mic. Here are some details:

    1. I can see the mic device as card 1, device 0:
    pi@InfoWall4:~ $ arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 1: CameraB409241 [USB Camera-B4.09.24.1], device 0: USB Audio [USB Audio]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    
    1. I can record to a wav and it plays back fine:
    pi@InfoWall4:~ $ arecord --device=plughw:1,0 --format cd --duration 10 --channels 1 testmic.wav
    
    Recording WAVE 'testmic.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
    
    1. I installed Hello-Lucy as per instructions, with 1 change. In dependcies.sh, I changed python-dev and python-pip references to python3-dev and python3-pip

    2. My config.js file has the following parms:

    {
    			disabled: false,
    			module: "Hello-Lucy",
    			position: "bottom_left",
    			config: {
        				keyword: 'OKAY JARVIS',             // keyword to activate listening for a command/sentence
     				timeout: 10,                        // timeout listening for a command/sentence
    				defaultOnStartup: null,
    				debug: true,
     				standByMethod: 'PI',              // 'DPMS' = anything else than RPi or 'PI'
     				microphone: "1,0",                  // run "arecord -l" card # and device # mine is "0,0"
     				sounds: ["silence.mp3"],      // welcome sound at startup. Add several for a random greetings
      				confirmationSound: "null.mp3",      // name and extension of sound file
    				soundPath: 'modules/Infowall/Sounds',
    				micOn: 'SpeechOn.wav',
    				micOff: 'SpeechOff.wav',
      				startHideAll: true,                 // All modules start as hidden EXCEPT PAGE ONE
    				pageOneModules: ["MMM-BackgroundSlideshow", "weather", "Hello-Lucy"],   // default to show on page1 start
        			}
    		},
    
    1. When I start up MM, Hello-Lucy shows:

    a9d7eedb-ef1e-484f-965f-d70633ea0eb1-image.png

    1. There are no issues showing in the PM2 logs. However, the Hello-Lucy error.log shows just 1 while debug.log shows an error:
    Error opening audio device plughw:1,0 for capture: Invalid argument
    FATAL: "continuous.c", line 245: Failed to open audio device
    

    So it seems like Hello-Lucy cannot grab hold of the mic device, even though I can access the mic just find from CMD.

    Any thoughts anyone?? Perhaps referencing python3 in the Hello-Lucy dependencies.sh script is not advisable?

    Thanks…

    S 1 Reply Last reply Apr 11, 2022, 1:54 AM Reply Quote 0
    • S Offline
      sdetweil @crazylegs
      last edited by Apr 11, 2022, 1:54 AM

      @crazylegs under the covers, Lucy uses pocketsphinx-continuous, which builds some files. it MIGHT use python to do that. I don’t know

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      C 1 Reply Last reply Apr 11, 2022, 2:00 PM Reply Quote 0
      • C Offline
        crazylegs @sdetweil
        last edited by Apr 11, 2022, 2:00 PM

        @sdetweil Thank you. Yes, I was thinking about the same thing and trying to avoid digging into the pocketsphinx code :) But I think that’s where I will head next.

        S 1 Reply Last reply Apr 11, 2022, 2:47 PM Reply Quote 0
        • S Offline
          sdetweil @crazylegs
          last edited by Apr 11, 2022, 2:47 PM

          @crazylegs I helped fix this code (and the Psc lib) long ago cause of the underlying library connecting to the mic

          in node_helper

          		this.ps = new Psc({
          			setId: this.name,
          			verbose: true,
          			microphone: this.config.microphone
          		});
          

          is where it connects to the mic

          and lmtool is the thing I think is in python

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            1/4
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy