Closed nmagerko closed 5 years ago
This is probably related to #36. Apparently, Apple changed something in Mojave that broke SoundCard. It is good to know that this affects PySoundCard (and therefore, pulseaudio), too, though. I'll see if the portaudio guys know a solution.
As it turns out, the issue is not this library at all. The actual issue is the terminal application I was using (iTerm).
OS X requires that applications receive user approval before granting them access to hardware like the microphone. Unfortunately, iTerm doesn't request access (even though the underlying script it's running needs access to it), and so things fail silently.
Luckily the built-in Terminal application handles this correctly. When I ran the code I wrote in there, I was prompted to allow access to my microphone and everything worked out. Sorry for the confusion!
I have the following code that I'm trying to run on OS X 10.14.1 (Mojave) via Python 3.7.0. It is essentially taken from the tutorial:
When I inspect
data
, it's an array of all-0.
's, and this is true for other sample rates too. I've checked the microphone being used and it is the built-in microphone as expected, and the built-in microphone seems to be picking up my voice when I speak into it from the OS X System Preferences menu.Any ideas about what's going wrong? I have restarted my machine and tried the
pysoundcard
library as well, but the same thing is happening. I can provide debug information as needed.