Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Speech recognition in Pythonista on an Apple Silicon mac only works if internet is off
-
I think there is a bug in the speech module.
I am using the Pythonista app on an M1 mac.
On Apple silicon macs (and maybe also on certain models of iPhone/iPad ?), speech recognition is done on-device. (To achieve this, the language model is downloaded and the processing is done on-device, and audio data is not sent to Apple servers)
When using the
speech.recognize()
command in a Pythonista script, to recognize speech from an audio file, I have noticed that it works correctly only if my computer is not connected to the internet.If my internet connection is active, then I get the following error:
Traceback (most recent call last): File "<string>", line 1, in <module> RuntimeError: Speech recognition failed: The operation couldn’t be completed. (kAFAssistantErrorDomain error 203.)
I have to turn off my wifi, so that Pythonista does not have internet access, in order for the speech recognition to work.