Forum Archive

SFSpeechrecognizer from Pythonista

yoyo

I know pythonista3 can access to objective-c library via objc_util.
Have anyone tried to use SFSpeechrecognizer via objc_util?
I want to know whether possible or not.

omz

Not sure if anyone has done this yet, but it should generally be possible.

However, you might also want to take a look at the speech module. It uses SFSpeechRecognizer internally for the speech.recognize() function.

yoyo

@omz Thank you for your comment.
Can recognize functiion in speech module translate a voice file to text only?
I checked a description about speech module, but there is not recognize function. I woiuild like to know current version documnent URL.

cvp

@yoyo select recognize, tap help and you'll get an explanation
Or select speech and tap help.
There is no url for new Doc but inside the app

yoyo

@cvp Thank you so much for your comment. I did’nt know this function. However, as far as I read a description about recognize, recognize function can translate a voice to text from recorded file.
I hope that my application can receive a voice directly, but if I implement following procedure, my hope may be able to be implemented.

  1. Sound recorder is executed.
  2. Record a user voice and save it.
  3. Call speech.recognize
  4. Translate voice file made by No.2 section to text file.