'Python speech recognition module isn't able to take time input correctly
I am building a small project where user will speak the time duration and the voice assistant will answer which lecture they would have to attend during that duration. For example -user said 10:45 to 12:45 then the voice assistant must answer Software Testing. Here the problem which I am facing is that my microphone is unable to take time durations like 2:15 to 3:15 and some other time durations too. To sum it up it is able to recognize some of the time durations and is unable to recognize rest of them. What should I do?
Solution 1:[1]
You should experiment with other speech recognition engines that are supported by the SpeechRecognition module to see if a different one works better for your use case. As of April 2022, there are 8 speech recognitions available to select from.
Take a look at this example code provided by the authors of the SpeechRecognition module: https://github.com/Uberi/speech_recognition/blob/master/examples/microphone_recognition.py
It demonstrates how different recognition engines can be used (Sphinx, Google, etc.). If none of those work well for you, it might be necessary to check out a different Python module. Unfortunately, speech recognition is very difficult and you're not going to be able to tweak the underlying models without putting forth a significant effort.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | dstricks |
