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.

    [HOTWORD:LPCM16] arecord: main:828 audio open error: Device or resource busy

    Scheduled Pinned Locked Moved Troubleshooting
    mmm-assistantmk2hotword
    7 Posts 3 Posters 3.3k Views 3 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.
    • M Offline
      M4gicD00bz
      last edited by

      Error:

      2020-04-26 15:48:17.583] [LOG]    [HOTWORD] Detector starts listening.
      [2020-04-26 15:48:17.701] [LOG]    [HOTWORD:LPCM16] arecord: main:828: 
      [2020-04-26 15:48:17.703] [LOG]    [HOTWORD:LPCM16] audio open error: Device or resource busy
      
      [2020-04-26 15:48:17.706] [LOG]    [HOTWORD] Final Result: { detected: false }
      [2020-04-26 15:48:17.724] [LOG]    [HOTWORD] begins.
      [2020-04-26 15:48:17.726] [LOG]    [HOTWORD] Detector starts listening.
      [2020-04-26 15:48:17.808] [LOG]    [HOTWORD:LPCM16] arecord: main:828: audio open error: Device or resource busy
      
      

      arecord -I:

      @raspberrypi:~ $ arecord -l
      **** List of CAPTURE Hardware Devices ****
      card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-codec-0 [Google voiceHAT SoundCard HiFi voicehat-codec-0]
        Subdevices: 0/1
        Subdevice #0: subdevice #0
      card 1: Snowball [Blue Snowball], device 0: USB Audio [USB Audio]
        Subdevices: 0/1
        Subdevice #0: subdevice #0
      

      aplay -I:

      pi@raspberrypi:~ $ aplay -l
      **** List of PLAYBACK Hardware Devices ****
      card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-codec-0 [Google voiceHAT SoundCard HiFi voicehat-codec-0]
        Subdevices: 0/1
      

      .asoundrc:

      pcm.!default{
        type asym
        playback.pcm{
          type hw
          card 0
        }
        capture.pcm{
          type plug
          slave.pcm "hw:1,0"
        }
      }
      
      ctl.!default{
        type hw
        card 0
      }
      

      config.js:

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information how you can configurate this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var config = {
      	address: "localhost", // Address to listen on, can be:
      	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
      	                      // - another specific IPv4/6 to listen on a specific interface
      	                      // - "", "0.0.0.0", "::" to listen on any interface
      	                      // Default, when address config is left out, is "localhost"
      	port: 8080,
      	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
      	                                                       // or add a specific IPv4 of 192.168.1.5 :
      	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
      	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
      	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
      
      	language: "en",
      	timeFormat: 24,
      	units: "metric",
      	// serverOnly:  true/false/"local" ,
      			     // local for armv6l processors, default 
      			     //   starts serveronly and then starts chrome browser
      			     // false, default for all  NON-armv6l devices
      			     // true, force serveronly mode, because you want to.. no UI on this device
      	
      	modules: [
      		{
      			module: "alert",
      		},
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		{
      			module: "clock",
      			position: "top_left"
      		},
      		{
      			module: "calendar",
      			header: "US Holidays",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						symbol: "calendar-check",
      						url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"					}
      				]
      			}
      		},
      		{
      			module: "compliments",
      			position: "lower_third"
      		},
      		{
      			module: "currentweather",
      			position: "top_right",
      			config: {
      				location: "New York",
      				locationID: "",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      				appid: "YOUR_OPENWEATHER_API_KEY"
      			}
      		},
      		{
      			module: "weatherforecast",
      			position: "top_right",
      			header: "Weather Forecast",
      			config: {
      				location: "New York",
      				locationID: "5128581",  //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      				appid: "YOUR_OPENWEATHER_API_KEY"
      			}
      		},
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			config: {
      				feeds: [
      					{
      						title: "New York Times",
      						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true,
      				broadcastNewsFeeds: true,
      				broadcastNewsUpdates: true
      			}
      		},
      		{
      			module: "MMM-Hotword",
      			position: "top_right",
      			config: {
      					chimeOnFinish: null,
      					mic: {
      							recordProgram: "arecord",
      							device: "plughw:0"
      					},
      					models: [
      							{
      								hotwords    : "smart_mirror",
      								file        : "smart_mirror.umdl",
      								sensitivity : "0.5",
      							},
      					],
      					commands: {
      							"smart_mirror": {
      									notificationExec: {
      											notification: "ASSISTANT_ACTIVATE",
      											payload: (detected, afterRecord) => {
      													return {profile:"default"}
      											}
      									},
      									restart:false,
      									afterRecordLimit:0
      							}
      					}
      			}
      		},
      		{
      		module: "MMM-AssistantMk2",
      		position: "top_right",
      		config: {
      				deviceLocation: {
      						coordinates: {
      								latitude: 37.5650168, // -90.0 - +90.0
      								longitude: 126.8491231, // -180.0 - +180.0
      						},
      				},
      				record: {
      						recordProgram : "arecord",  
      						device        : "plughw:0",
      				},
      				notifications: {
      						ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
      						ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
      				},
      				useWelcomeMessage: "brief today",
      				profiles: {
      						"default" : {
      								lang: "en-US"
      						}
      				},
      		}
      		},
      	]   
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      S 1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User
        last edited by

        what is the device used for recording mic ?

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @M4gicD00bz
          last edited by

          @M4gicD00bz said in [HOTWORD:LPCM16] arecord: main:828 audio open error: Device or resource busy:

            					device: "plughw:0"
          

          but the asoundrc says hw:1,0 (which should be correct unless u are using the google voicehat, and have installed the software to enable it)

          should be device: “plughw:1,0”

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User
            last edited by

            @sdetweil : that’s why i asked this question ;)

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @Guest
              last edited by

              @Bugsounet it would never have been “plughw:0”, maybe “plughw:0,0”

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • ? Offline
                A Former User
                last edited by

                not necessary, it should be plughw:0, plughw:1 or null (for default setting)

                after, maybe one module use already the mic …
                in this case arecord return an error (device busy)

                1 Reply Last reply Reply Quote 0
                • M Offline
                  M4gicD00bz
                  last edited by M4gicD00bz

                  I’ve tried every variation. I’ve scrapped everything. Starting from scratch again. I guess I’ll come back if still an issue.

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • First post
                    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