Package: scikit-surgeryspeech
Author: Kim-Celine Kahlscikit-surgeryspeech is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).scikit-surgeryspeech supports Python 3.6.scikit-surgeryspeech is a project which runs thePython Speech Recognition APIin the background listening
for a specific command. After saying the keyword you can say different commands, which get
converted to QT Signals.The speech recognition is done by theGoogle Cloud API, you have to get the credentials to use it or change the recognition service.Keyword detection is done by thePorcupine API. This should be have been installed automatically via the pvporcupine dependencyPlease explore the project structure, and implement your own functionality.Example usageTo run an example, just startsksurgeryspeech.py -c example_config.jsonThe config file should define the paths for the porcupine library and the Google Cloud API if you are using it.You can then say the keyword depending on the Porcupine keyword file you chose and afterwards a command. The command “quit” exits the application.Note: each time you have already entered a command, you need to say the keyword again to trigger the listening to commands.DevelopingCloningYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/scikit-surgeryspeechIf you have problems running the application, you might need to install portaudioMacbrew install portaudioUbuntusudo apt-get install libasound-dev portaudio19-devIf you’re going to try sphinx might need to install pulseaudo-devUbuntusudo apt-get install swig libpulse-devSet up the Porcupine keyword detectionThen, you have to set the following variables in the configuration file"porcupine dynamic library path" : ".tox/py37/lib/python3.7/site-packages/pvporcupine/lib/linux/x86_64/libpv_porcupine.so",
     "porcupine model file path" : ".tox/py37/lib/python3.7/site-packages/pvporcupine/lib/common/porcupine_params.pv",
     "porcupine keyword file" : [".tox/py37/lib/python3.7/site-packages/pvporcupine/resources/keyword_files/linux/jarvis_linux.ppn"],You can alsogenerate your own keyword filesIf you are using the speech recognition service within your own application, you have to start a background thread which calls the method to listen to the keyword over and over again.You can find an example how to create such a thread in the sksurgeryspech_demo.pyUse the Google Cloud speech recognition serviceTo use the Google Cloud speech recognition service, you need toget the credentialsfirst. After signing up, you
should get a json file with your credentials. Download this file and add add it to the configuration file"google credentials file" : "snappy-speech-6ff24bf3e262.json",To the path of your json file. You should then be able to run the application.Change speech recognition serviceYou can try different speech recognition services by changing the recogniser entry in the config file.
sphinx, google and google_cloud have all been tested, other options are possible but may not be implemented yet."recogniser" : "sphinx"
"recogniser" : "google"
"recogniser" : "google_cloud"
"recogniser" : "wit"
"recogniser" : "bing"
"recogniser" : "azure"
"recogniser" : "houndify"
"recogniser" : "ibm"Python developmentThis project uses tox. Start with a clean python environment, then do:pip install tox
toxand the commands that are run can be found in tox.ini.InstallingYou can pip install directly from the repository as follows:pip install git+https://github.com/SciKit-Surgery/scikit-surgeryspeechContributingPlease see thecontributing guidelines.Useful linksSource code repositoryLicensing and copyrightCopyright 2019 University College London.
scikit-surgeryspeech is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.