It's an iterator class for continuous recognition or keyword search from a file. join ( model_path, 'cmudict-en-us.dict' ) ) for phrase in speech : print ( phrase ) AudioFile join ( model_path, 'en-us.lm.bin' ), dic = os. With your model and dictionary: import os from pocketsphinx import LiveSpeech, get_model_path model_path = get_model_path () speech = LiveSpeech ( verbose = False, sampling_rate = 16000, buffer_size = 2048, no_search = False, full_utt = False, hmm = os. from pocketsphinx import LiveSpeech for phrase in LiveSpeech (): print ( phrase )Īn example of a keyword search: from pocketsphinx import LiveSpeech speech = LiveSpeech ( lm = False, keyphrase = 'forward', kws_threshold = 1e-20 ) for phrase in speech : print ( phrase. It's an iterator class for continuous recognition or keyword search from a microphone. More binary distributions for manual installation are available here. Python -m pip install -upgrade pip setuptools wheel Installation # Make sure we have up-to-date versions of pip, setuptools and wheel This package provides a python interface to CMU Sphinxbase and Pocketsphinx libraries created with SWIG and Setuptools. Pocketsphinx is a part of the CMU Sphinx Open Source Toolkit For Speech Recognition.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |