sveinbjornt / hear

Command line speech recognition and transcription for macOS
https://sveinbjorn.org/hear
BSD 3-Clause "New" or "Revised" License
303 stars 18 forks source link

Doesn't work in VisualStudioCode #24

Closed ArtemBernatskyy closed 1 year ago

ArtemBernatskyy commented 1 year ago

Thanks for awesome software! It works in terminal but when I run the same script using visualstudiocode it outputs nothing (no errors too, neither in code or in result.stderr).

I run it like result = subprocess.run(["./hear", "-l", "en-US", "-d", "-p", "-i", "output.wav"], capture_output=True, text=True) VisualStudioCode has access to microphone and it works (checked it) Thx!

ArtemBernatskyy commented 1 year ago

Ah I see, the problem is that default MacOS terminal has access to kTCCServiceSpeechRecognition (aka speech recognition permission in MacOS), but integrated in VisualStudioCode doesn't have...

I don't know if this could be fixed on your side, so will wait for the response...

sveinbjornt commented 1 year ago

Nothing I can do. This is a permissions issue that needs to be resolved by VS Code (and probably won't).

ArtemBernatskyy commented 1 year ago

No problem, thx. For anyone coming here to fix this you need to disable SIP and grant VSCode permission (kTCCServiceMicrophone) via terminal via editiing /Library/Application\ Support/com.apple.TCC/TCC.db , have fun :)