lundi 13 juin 2016

Using Voice instead of 'raw_input' in python for Mac OS X


I'm in the process of making a Python-based personal assistant/question answerer, which, in my wildest dreams, will rival the inevitable "Siri For Mac". However, as of now, it requires you type text into an infinite loop of raw_inputs, and processes the text each time. But if this is ever to be useful to, well, people, it can't be a .py in a terminal window. As of now, I'm thinking about making it a simple .app with Platypus. But, since there is no text input on the Window app style for Platypus, I would include no GUI, and just have it all be speech-based, for input and output. Output is simple, I can just replace all 'print' lines with 'speakString' from "macspeech". But input would be the tricky part. I can only find libraries to input speech on Windows (pyspeech is EXACTLY what I need, but it's windows-based). Anyone heard of something like pyspeech for mac/universal?


Aucun commentaire:

Enregistrer un commentaire