Open rflcrz opened 1 year ago
Strange issue. The hear binary does contain an embedded Info.plist: https://github.com/sveinbjornt/hear/blob/master/Info.plist
This must be something specific to Alacritty, since everything runs just fine in iTerm and Terminal.app.
I tried adding NSSpeechRecognitionUsageDescription to Alacritty's Info.plist, and was able to reproduce your result. However, launching Alacritty from the command line in iTerm or Terminal.app works. It looks like subprocesses inherit the permissions of the parent process:
$ /Applications/Alacritty.app/Contents/MacOS/alacritty
At no point does Alacritty appear in this permissions list in Settings despite the changed Info.plist:
I haven't figured out why but this lets me use hear
directly Alacritty
what I did is I launched skhd
through alacritty and had it run a script that uses hear. that that point i was asked by the os (13.x) if I wanted to let Alacritty use the speech recognition and I did. Now I can directly call hear in Alacritty and it works fine.
I encountered the same zsh abort issue when running hear
in the vscode terminal. Similar to Alacritty, speech recognition permission doesn't list vscode but I don't have a way to request that permission.
When I run 'hear' from Alacritty it does not ask access to speech recognition and return 'zsh: abort'.
Console.app:
On the other hand, when I tried to run 'hear' using Terminal.app, it worked perfectly. Terminal asked for access to speech recognition and started outputting the transcribed text.
Apple documentation says that "You must include the NSSpeechRecognitionUsageDescription key in your app’s Info.plist file. If this key is not present, your app will crash when it attempts to request authorization or use the APIs of the Speech framework."(1) Because "This key is required if your app uses APIs that send user data to Apple’s speech recognition servers."(2)
I added to /Applications/Alacritty.app/Contents/Info.plist:
Now 'hear' exit with:
Does anyone know how to solve this issue? Or have any suggestion?
Thanks!