Comments (2)
`import speech_recognition as sr
def speechrecognition():
r=sr.Recognizer()
with sr.Microphone() as source:
print('Listening.....')
r.pause_threshold=1
audio=r.listen(source,0,0)
try:
print('Recognizing.....')
query=r.recognize_google(audio,language='eng-in')
return query.lower()
except:
return ''
speechrecognition()`
I use this code but getting error, kindly help me to resolve this error:
Traceback (most recent call last):
File "f:\Project AI\chk.py", line 17, in
speechrecognition()
File "f:\Project AI\chk.py", line 5, in speechrecognition
with sr.Microphone() as source:
^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\speech_recognition_init_.py", line 80, in init
self.pyaudio_module = self.get_pyaudio()
^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\speech_recognition_init_.py", line 111, in get_pyaudio
from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'
from speech_recognition.
i tried with,
python -c "import speech_recognition as sr;def speechrecognition(): r=sr.Rec
ognizer() with sr.Microphone() as source: print('Listening.....') r.pause_thresh
old=1 audio=r.listen(source,0,0)
no success.
from speech_recognition.
Related Issues (20)
- Refactor recognize_google
- openai.Audio is no longer supported when using recognize_whisper_api HOT 5
- YOLOv8 training error HOT 1
- (question) Can I force offline mode? HOT 1
- Ilegal use of this repository agains Google HOT 1
- fasterwhisper and distilwhisper implementations HOT 4
- flac-mac uses an SDK older than the 10.9 SDK and cannot be notarized (with workaround) HOT 1
- No module named 'distutils' on Python 3.12 HOT 9
- WinError 10054 HOT 3
- Feature Request: GoogleCloudSpeech - Add method parameters to set use_enhanced and model options HOT 1
- most of the Audio are note detected HOT 1
- AttributeError: 'Recognizer' object has no attribute 'recognize_google' HOT 7
- AttributeError: 'Recognizer' object has no attribute 'recognize_google' HOT 1
- Acoustic echo cancellation (AEC) support - feedback loops or erroneous recognition of spoken commands
- Error when running simple speech recognition code HOT 26
- recognize_google Is it free of charge HOT 1
- Библиотека speech_recognition не видит модуль recognize_google
- On Raspberry Pi 4B, calling Microphone() resource in a subprocess triggers a Segmentation Fault after the subprocess ends.
- Is it possible to read input stream from two different indexes simultaneously and process it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speech_recognition.