Could not find PyAudio
See original GitHub issueI installed chaquopy on my Android Studio then ı tried to run below code
import speech_recognition as sr
import time
r = sr.Recognizer()
mic = sr.Microphone()
def transcript(transcript=''):
with mic as source:
r.adjust_for_ambient_noise(source)
audio = r.listen(source)
try:
transcript = r.recognize_google(audio,language='tr-TR')
except sr.UnknownValueError:
time.sleep(1)
except sr.RequestError:
time.sleep(1)
return transcript
But I got this error
Caused by: com.chaquo.python.PyException: AttributeError: Could not find PyAudio; check installation
at <python>.speech_recognition.get_pyaudio(__init__.py:110)
at <python>.speech_recognition.__init__(__init__.py:79)
at <python>.konus.<module>(konus.py:5)
at <python>.importlib._bootstrap._call_with_frames_removed(<frozen importlib._bootstrap>:219)
at <python>.importlib._bootstrap_external.exec_module(<frozen importlib._bootstrap_external>:783)
at <python>.java.android.importer.exec_module(importer.py:549)
at <python>.java.android.importer.exec_module(importer.py:594)
at <python>.importlib._bootstrap._load_unlocked(<frozen importlib._bootstrap>:671)
at <python>.importlib._bootstrap._find_and_load_unlocked(<frozen importlib._bootstrap>:975)
at <python>.importlib._bootstrap._find_and_load(<frozen importlib._bootstrap>:991)
at <python>.importlib._bootstrap._gcd_import(<frozen importlib._bootstrap>:1014)
at <python>.importlib.import_module(__init__.py:127)
at <python>.chaquopy_java.Java_com_chaquo_python_Python_getModule(chaquopy_java.pyx:156)
at com.chaquo.python.Python.getModule(Native Method)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Could not find PyAudio; check installation...can't use speech ...
In Terminal type pip install pipwin. Then pipwin install pyaudio.
Read more >AttributeError: Could not find PyAudio; check installation #235
Steps to reproduce. Hey I am just getting started with speech recignition and i was just checking some basic examples that i had...
Read more >could not find pyaudio, check installation. How to solve this ...
although my pyaudio module is installed,yet my speech recognition module not working, showing AttributeError : could not find pyaudio, check installation.
Read more >speech recogniition - Raspberry Pi Forums
Could not import the PyAudio C module '_portaudio'. ... AttributeError: Could not find PyAudio; check installation. It's quite long.
Read more >could not find PyAudio, check installation - Ask Ubuntu
The error is mostly caused by errors in the step sudo python setup.py install , which is supposed to install pyaudio. You need...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the report. Unfortunately Android doesn’t support any of the standard Linux audio APIs, so I think PyAudio / PortAudio would require a new backend in order to work.
If anyone else needs this package, please click the thumbs-up button above and subscribe to this issue, and we may look into it in the future.
Yes, that should be possible. But I don’t think we currently support any Python packages which can decode compressed audio, so you’d have to pass the audio as an uncompressed WAV file, or raw PCM.