2.4.2 on Catalina 10.15.7: no sound on recording

I have Audacity 2.4.2 on a Mac with system 10.14, trying to save cassette recordings from a USB device to my Mac. A box appears: Error opening recording device. Error Code -9997 Invalid sample rate. Info says I should match the sample rate in Audacity with that on device.

I am not a techie! What does that mean and how do I do it?

“Error Code -9997 Invalid sample rate.”

This “box” is very familiar to me. If your problem is anything like mine, then the error code is a red herring. The problem is not that the sample rate is wrong (though it may be). The problem is that audacity cannot connect to your input source because of a bizarre permissions problem.

The following is a “hack” to side-step the problem, that worked for me. I assume your user has admin privileges, ie. you can enter, in a terminal window, command lines that start with “sudo”.

Enter this: “sudo /Applications/Audacity.app/Contents/MacOS/Audacity ;”
(I am not sure if the final “;” is necessary, but it does no harm")

Watch carefully. With any luck, a box will float up somewhere asking you if you are happy for “Terminal” to access the microphone or sound-card or something. Say yes. I forget whether the Audacity interface was already up, or appeared subsequently to the “yes”. In my case, once the permission had been granted, Audacity seemed to work normally. If you open System Preferences, and look in the Security and Privacy pane, with “Microphone” checked, you should see that “Terminal” has been granted the privilege to access the microphone.

There may be some issue about closing/quitting Audacity when you have invoked it in this way. Make sure to save your work before trying to quit Audacity.

I hope the above is some help to you.

Thanks for all your replies. I am using an external mic and an external speaker both of which are recognized by both my Mac and by Audacity. I just have to keep plugging away until I get it. Keep your ideas coming, and thanks.

By the way, the title of my post should say “No sound on recording”. My goal again is to hear the imported track as I record my part on a separate mono track. My recording track is working great but I can’t hear the music track below that I imported. The only way I know how fast to play is to hear the imported track.

Ensure that “Overdub” is enabled (in “Transport menu > Transport options”) and that your headphones are selected for playback in the Device Toolbar.

So after spending the evening working on being able to play a track while recording another at the same time, I’ve come to the conclusion that I’m working hard, not smart. So I exported the track I wanted to play to Music. That allowed me to play it in Music while I recorded my part in Audacity. Problem solved.

Thanks for all your comments.

Hello, I have spent two days trying everything posted in the previous messages and my Audacity 2.4.2 is not recording or playing back anything on MacOS 10.15.7
It always shows me the -9997 error and nothing else.
I have tried using the Terminal workaround and nothing (only a long list of errors)
And after many tests with different versions of Audacity, now Audacity is not showing anymore in the Security & Privacy > Privacy > Microphone pane … it was there before, but even installing the application again and again, it doesn’t show up there now.
Suggestions are welcomed. Thanks.

Hi. Same problem for me: error 9997 Invalid Sample Rate! 44100Hz…OS Catalina 10.15.7 con Logic 10.4.7 Last Audacity version…all is ok about Sample Rate Frequency. Audacity is not showing anymore in the Security & Privacy > Privacy > Microphone panel! Please help me

Sorry, not a Mac expert here. Until one does come along, make sure that your USB is plugged in before starting Audacity. :neutral_face:

What input device are you trying to use?
– Bill

Further to my report somewhere above. (Recommending running via sudo, which isn’t really an option.)

I created a fresh “test” user on my Catalina system, and Audacity 2.4.2 works fine for he/she/it.

I have built audacity 3.0.0-alpha-Feb 7 2021 from source at github, and it fails in the normal way for my usual user.

This makes my think that the problem lies somewhere in my ~/Library directory. This is, admittedly, a mess, with over a decade of installing Plug-Ins, migrations etc. I have now learnt more about Apple permissions, ACLs etc than I ever wanted to know, but am not much closer to pinpointing the culprit. It isn’t feasible for me to clean install Catalina, given all the history on my machine, and the other uses I make of it.

I have scanned ~/Library for files/folders unreadable by my normal user, and there are gazillions. I feel I’d like some way of getting a trace of the files accessed by Audacity to home on on the likely culprits. I wonder why Audacity under Catalina has such sensitivity to permissions, while other audio-related applications (eg Garageband, Zoom, Jitsi, Musescore etc etc) do not. Does it centre around Portaudio??

Since the problem seems to be in my system, I assume there is little point in submitting a diagnostic/debug log/report.

Did you install those other apps from Apple Store?

Probably not – tbh, I can’t remember precisely where they came from. Of course Garageband came from Apple.

Quite a few of the audio plugins I installed (over many years) came from Focusrite, and other purveyors of music gadgetry, like IK Multimedia. I rather regret not being more wary of some of these things. (I do trust Focusrite, who have a good reputation to maintain.)

The reason that I mention that is because Apple strongly favor apps that are either shipped with macOS or installed from the Apple Store.
Apple’s default strategy for other apps is to block them.

Reflecting on how apple might “block” audio components it disapproves of, I speculate that “com.apple.quarantine” is an interesting extended attribute to look for.

On my system

find ~/Library/Audio/ -type f  -print0 | xargs -0 xattr -l | grep quarantine | wc

reports 4581 files.

find ~/Library/Audio/ -type f  -print0 | xargs -0 xattr -l | grep -v  quarantine | wc

reports 42810 files.

There is likely some more intelligent way to focus in on the files that are imporant to Audacity. (Suggestions welcome!)

Apparently some command vaguely like

sudo xattr -d -r com.apple.quarantine ~/Desktop/plugins/*

might be useful to remove the “blockage”. I’ve no idea whether that would persist, or something in the OS would sometime reimpose the block.

PS. I though I should add a diagnostic log.

I’d like to stress that while I have been able to grant access to “the microphone” to several apps, including Garageband, Google Chrome and Firefox (probably for using Jitsi Meet through them), zoom.us.app, etc, not once has Audacity appeared in the Security/Microphone pane, despite all permutations of rebooting, reinstalling Audacity, resetting audacity.cfg, clearing the infamous PRAM, etc.

(A Focusrite support page gave me the idea there might be a time-limit on how soon after a reinstallation this has to be done. Maybe I just keep somehow missing the boat with Audacity?)

I notice that the source for audacity invokes the command

tccutil reset Microphone org.audacityteam.audacity

. I presume this is so that Audacity should get a fresh chance to ask for microphone permissions (in case that was incorrectly disallowed on a previous occasion). If I invoke this (without sudo) I get “Successfully reset Microphone approval status for org.audacityteam.audacity”. (13 times!). But I still don’t get an Audacity box in the microphone security tab to tick. Just “Error opening recording device. Error code -9997 invalid sample rate”. I could try this with sudo, maybe after disabling SIP, but I’m already way out of my depth.
Audacity_dbgrpt-82413-20210210T151819.zip (19.3 KB)

I am also having the same problem, not being able to record anything (or playing any files either!) and on top of that, AUDACITY is not shown in the Security & Privacy → Privacy → Microphone. It doesn’t show up there.

I have been using Audacity for many years and never had a problem like this before. I uninstalled and reinstalled the program multiple times, and have tried several of the things I was reading in the Forum, but nothing has worked since I moved to Catalina 10.5.7

Any help is welcomed. Thanks!

Ensure that you have Audacity version 2.4.2. Apple now require that applications are “notarized”, but older versions of Audacity are not notarized, whereas 2.4.2 is. If you are unsure which version you have, get a fresh copy of Audacity via the Audacity website: https://www.audacityteam.org/download/mac/

Thank you steve.
Yes, I am using 2.4.2… and I have uninstalled and reinstalled fresh versions several times. Nothing works!

A possible solution was posted here: https://forum.audacityteam.org/t/problems-getting-sound-into-audacity/60358/4

Success!! After weeks of frustration. For others in the same boat as me, I would like to offer a glimmer of hope.

Who is in the same boat? Those unable to play, or record audio in Audacity 2.4.2 on Catalina 10.15.7. Those who are never asked to grant “microphone” access to Audacity. Those who see screeds of inscrutable messages like the following when running Audacity from a terminal.

||PaMacCore (AUHAL)|| Failed to open AUHAL component.||PaMacCore (AUHAL)|| Error on line 1263: err='-50', msg=Unknown Error

The clue was that Audacity behaves properly when run from a fresh test account. Therefore, the problem must lie somewhere in my (dauntingly large) Library folder. The penny finally dropped that I should pay attention the letters “AU” and the word “component” in the error message. I simply archived everything below


, then deleted it all. Audacity then behaved itself nicely.

I saw nothing untoward in that subtree; for example running gnu “file” on the executables under MacOS subtree directories showed no 32-bit executables, or anything else suspicious. I may yet have to reinstall some components I use in Garageband (which has always behaved itself properly, asking for “microphone” access, making use of my favourite effects, etc). But AT LAST I know where the problem is – if not exactly why it has caused me such grief over so many weeks.