Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No microphone permission prompt on macOS in Spyder/JupyterLab #574

Open
wooii opened this issue Dec 8, 2024 · 0 comments
Open

No microphone permission prompt on macOS in Spyder/JupyterLab #574

wooii opened this issue Dec 8, 2024 · 0 comments

Comments

@wooii
Copy link

wooii commented Dec 8, 2024

Description:
On macOS, recording audio with sounddevice does not trigger a microphone permission prompt and fails to record when run in Spyder or JupyterLab. This works as expected in VS Code and Jupyter Notebook.

Environment:

  • macOS: 15.1.1
  • Python: 3.12.7
  • sounddevice: 0.5.1
  • Spyder: 6.0.1
  • JupyterLab: 4.2.5

Steps to Reproduce:

  1. Run the following code in Spyder or JupyterLab on macOS.
  2. No permission prompt appears.
  3. Recording fails.
import sounddevice as sd
import matplotlib.pyplot as plt

duration = 3
fs = 16000
print("Recording...")
audio = sd.rec(int(duration * fs), samplerate=fs, channels=1)
sd.wait()

plt.plot(audio)
plt.show()

print("Playing...")
sd.play(audio, fs)
sd.wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant