Closed tvikneshwar closed 6 years ago
I don't quite understand the question. You may want to elaborate a bit more.
With that being said, the method recognize_sphinx
from the Recogniser
class takes a positional argument keyword_entries
which is a list of tuples of a string and a float between 0 and 1. The words in the list is what sphinx will look for while processing the audio. Reference the documentation for more details.
I hope that answers your question.
I am working on HFM(Hands Free Module ) based Car Infotainment System and the objective of this project is to make hands free call through the connected phone by pronouncing contact name, eg call Hari Lal .My speech recognition engine can recognise the words Call, Dial, Redial easily , because those words are already in the dictionary (generic words).How to create dictionary for names those are not in dictionary.
Hi @tvikneshwar.
Ok, now I know what you mean. Sadly, I cannot really help you nor can this library. From what I understand, you want to add certain "custom" words to the language model of Sphinx itself. This is not a trivial task. I suppose you'll have to build a completely separate model if you want to achieve this. Online I've found this tutorial on the official Sphinx page. You should really look into Sphinx if you want something custom behavior on the actual speech recognizer . The library here just brings several APIs together and doesn't extend the functionality of Sphinx (or any other API). After you've build your model, you can follow the instructions in the documentation on adding a language model to the Sphinx API in the library. This is not that hard.
Steps to reproduce
Expected behaviour
(What did you expect to happen?)
Actual behaviour
(What happened instead? How is it different from what you expected?)
System information
(Delete all the statements that don't apply.)
My system is. (For example, "Ubuntu 16.04 LTS x64", "Windows 10 x64", or "macOS Sierra".)
My Python version is. (You can check this by running
python -V
.)My Pip version is. (You can check this by running
pip -V
.)My SpeechRecognition library version is. (You can check this by running
python -c "import speech_recognition as sr;print(sr.__version__)"
.)My PyAudio library version is / I don't have PyAudio installed. (You can check this by running
python -c "import pyaudio as p;print(p.__version__)"
.)My microphones are: (You can check this by running
python -c "import speech_recognition as sr;print(sr.Microphone.list_microphone_names())"
.)My working microphones are: (You can check this by running
python -c "import speech_recognition as sr;print(sr.Microphone.list_working_microphones())"
.)I installed PocketSphinx from. (For example, from the Debian repositories, from Homebrew, or from the source code.)