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

PortAudio (through sounddevice Python wrapper) not able to record from microphone on Mac Big Sur #117932

Closed
jamesmeiklejohn opened this issue Mar 1, 2021 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@jamesmeiklejohn
Copy link

Issue Type: Bug

The integrated terminal in VS Code doesn't seem to have permission to access the microphone on Mac OS Big Sur, although it can see the available devices.

Running the following code in the integrated terminal, the recording is all 0s, whereas it works properly running in the same Python environment in the Terminal app.

`
import sounddevice as sd

print(sd.query_devices(device=None, kind=None))

samplerate = 48000 # Hertz
duration = 1 # seconds

mydata = sd.rec(int(samplerate * duration), samplerate=samplerate,
channels=1, blocking=True)
print(mydata)
`

VS Code version: Code 1.53.2 (622cb03, 2021-02-11T11:45:54.515Z)
OS version: Darwin x64 20.3.0

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz (8 x 1400)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 2
Memory (System) 8.00GB (0.23GB free)
Process Argv --crash-reporter-id 5139e64b-6b78-4158-826d-d1e81bea9c8b
Screen Reader no
VM 0%
Extensions (5)
Extension Author (truncated) Version
mdmath goe 2.5.1
latex-workshop Jam 8.16.0
python ms- 2021.2.582707922
vscode-pylance ms- 2021.2.4
jupyter ms- 2021.2.603412351
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt617cf:30253240
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30256636
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30259475
pythontb:30260843

@deepak1556
Copy link
Collaborator

/duplicate #95062

@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants
@deepak1556 @meganrogge @jamesmeiklejohn and others