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.

    arecord sudo only

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    8 Posts 2 Posters 2.0k 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.
    • K Offline
      kupperma
      last edited by

      Hello
      I installed a USB-Micro and a speaker on the headphone socket.
      I used aplay and arecord to test.
      when typing aplay … and enter it runs and plays the sound
      when typing arecord…out.wav it says no rights
      so I tried sudo arecord… it runs and records the file, which I can listen to via aplay.

      MagicMirror cannot access the micro because of sudo.

      How can I change the rights for arecord so MM can use it?

      Manfred

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

        @kupperma chmod and chown are the two commands to change permissions and group assignments

        which arecord

        will tell you where it is

        ls ??? -laF
        will give you the current info
        ??? is the output of which

        permissions are 3 settings read/write/execute
        for each of 3 user relationships

        user - user is the owner
        group - user accessing is my the owner, but in the group
        other - user accessing is not in the above

        3 bits
        4 - read
        2 - write
        1 - execute

        7 is all 3
        6 is read/write
        2 is write only

        777 is all permissions for all users ( bad)

        each user has their own group as well.

        u will need to use sudo to change the permissions or user/group assignments

        see the help for each command, for example

        chmod --help

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          kupperma @sdetweil
          last edited by

          @sdetweil
          Thank you for your reply.

          pi@raspberrypi:/ $ arecord --format=S16_LE --duration=5 --rate=16000 --file-type=wav out.wav
          Aufnahme: WAVE ‘out.wav’ : Signed 16 bit Little Endian, Rate: 16000 Hz, mono
          out.wav: Keine Berechtigung

          This ist the arecord without sudo

          pi@raspberrypi:/ $ sudo arecord --format=S16_LE --duration=5 --rate=16000 --file-type=wav out.wav
          Aufnahme: WAVE ‘out.wav’ : Signed 16 bit Little Endian, Rate: 16000 Hz, mono

          and here the task with sudo.

          ls arecord or find arecord – file or folder not found.

          I assume that arecord is part of aplay probably of the alsa family.
          But why do tasks of the same family ask for different rights.

          Manfred

          S 2 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @kupperma
            last edited by

            @kupperma oh, you are in the root folder /

            it’s the write of out.wav that is causing the problem

            cd ~

            to go to the users home folder

            everything (mm related) should be installed there

            generally, never use sudo unless u know WHY u need to do that

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @kupperma on your ls arecord, file not found

              u forgot to do

               which arecord
              

              and use it’s output, the full path to arecord

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kupperma @sdetweil
                last edited by kupperma

                @sdetweil
                pi@raspberrypi:~ $ which arecord
                /usr/bin/arecord

                pi@raspberrypi:~ $ ls /usr/bin/arecord -laF
                lrwxrwxrwx 1 root root 5 16. Apr 2021 /usr/bin/arecord -> aplay*

                Is it that way that I have to set the microphone in MM separately so that the Module MMM-voice will recognize the micophone which is on card 1 device 0.

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

                  @kupperma said in arecord sudo only:

                  wxrwxrwx

                  areceord is execuatble by the user (root) and the group(root) and others (everyone else)

                  arecord -l

                  will list recording devices

                  mmm-voice says config

                  microphone	REQUIRED	Id of microphone shown in the installer.
                  

                  shown in the installer <---- thats the key

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  K 1 Reply Last reply Reply Quote 0
                  • K Offline
                    kupperma @sdetweil
                    last edited by

                    @sdetweil
                    thank you,
                    I have set in the config of MMM-voice the microphone 1, but there is still an error.
                    I will ask the developer of MMM-voice.

                    Manfred

                    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