Microphone access works when I run it using just the script app.py, but is non-responsive once I package the app.
So far I have tried
- Changing the .spec file manually and adding
info_plist={
'NSMicrophoneUsageDescription': 'This application requires microphone access to convert speech to text.',
},
- Editing the Info.plist directly with
<key>NSMicrophoneUsageDescription</key>
<string>This application requires microphone access to convert speech to text</string>
- Writing explicit functions to trigger permission request
def request_mic_permissions(self):
import pyaudio
pa = pyaudio.PyAudio()
try:
stream = pa.open(format=pyaudio.paInt16, channels=1, rate=44100, input=True, frames_per_buffer=1024)
print("Requesting microphone permissions...")
data = stream.read(1024) # Attempt to read from the microphone to trigger the permission request
stream.close()
print("Microphone access granted.")
except Exception as e:
print(f"Failed to access microphone: {e}")
finally:
pa.terminate()
But none of these have yet succeeded.
This post suggests adding an entitlements.plist but my microphone access request isn't working even before code signing and notarization.

Microphone access works when I run it using just the script app.py, but is non-responsive once I package the app.
So far I have tried
But none of these have yet succeeded.
This post suggests adding an entitlements.plist but my microphone access request isn't working even before code signing and notarization.