0

I have written a program in Python with pyaudio which requires microphone access. The program works perfectly when launched from the terminal but when it is bundled up as an app with py2app it does not request microphone permission when I launch it.

Before I upgraded my mac to Ventura, finder would always ask permission to access he microphone.

Can anyone suggest a hack to fix this problem.

Obviouly I have tried turning on microphone access in Privacy and Security Settings, but since Ventura does not recognise that my app wants microphone access it does not appear in the microphone access settings.

As soon as my code runs it requests audio access.

# Get audio parameters
    devices = fn.get_device_list()
    p = pyaudio.PyAudio()
    audio_format = pyaudio.paInt16
    device_channels = devices[device]['maxInputChannels']
    
    # Open the selected audio input device
    stream = p.open(
        format=audio_format,
        channels=device_channels,
        rate=sample_rate,
        input=True,
        output=False,
        input_device_index=device,
        frames_per_buffer=chunk_size)

0 Answers0