-1
  ERROR: Failed building wheel for kivy
  Failed to build kivy
  ERROR: Could not build wheels for kivy, which is required to install pyproject.toml- 
  based projects

This is the source of speech to text file that is I try to install the owner of speech to text say you need to install these...

https://github.com/iAhsanJaved/Urdu2English

pip install SpeechRecognition kivy googletrans

but while I execute the command, it then takes too much time and then the error show on my screen. Please help,

enter image description here

furas
  • 134,197
  • 12
  • 106
  • 148
  • pip install pyproject-toml should solve you problem. – Rangeesh Oct 16 '21 at 16:25
  • always put code, data and full error message as text (not screenshot, not link) in question (not in comment). – furas Oct 16 '21 at 19:10
  • error shows `"portaudo.h" file not found` - and `portaudio.h` is C/C++ header file and this can means you have to install `portaudio` source code or at least header files. On Linux headers files usually are in packages with suffix `-dev`. On my Linux I used `apt search portaudio` and found `portaudio19-dev` – furas Oct 16 '21 at 19:13

1 Answers1

0

Error shows

"portaudio.h" file not found

and this is main problem.

It seems SpeechRecognition needs Python module pyaudio which needs C/C++ library portaudio and its C/C++ headers portaudio.h to correctly compile C/C++ code in pyaudio.

portaudio is not Python module so you can't install it with pip but with tools like apt on Linux Mint/Ubuntu or probably brew on Mac.

I use Linux Mint.

On Linux Mint packages with headers usuall have suffix -dev (because they are needed to develop code) and I can find them with

apt search portaudio

which gives me libportaudio2 and portaudio19-dev so I can install

apt install libportaudio2 portaudio19-dev

and this should resolve this problem.

furas
  • 134,197
  • 12
  • 106
  • 148