I will also demonstrate how to import modules pyttsx3, SpeechRecognition in this post along with PyAudio as mentioned in the title.
Firstly, ensure that python is installed by running the below command from the cmd prompt.
py -3 --version
Installation of module pyttsx3
Go to MS Visual Studio Code and open the terminal(powershell) to install module pyttsx3.
Later, I tried to install the package in another folder where I created a python project.
Once installed, use the below command to verify if it is installed.
pip list
Installation of ipykernel
While running the program, I also installed ipykernel as it was showing up some new error.
A powerful interactive Python shell and a Jupyter kernel to work with Python code in Jupyter notebooks and other interactive frontends.
Setting Up Environment variable as Python 3.9.1
I also got another error 'ModuleNotFoundError' while running.
Installation of SpeechRecognition
Once I made text to speech work, I started with speech to text.
Installation of pyaudio
Installing pyaudio has some problem with pip commands, so I installed Anaconda individual edition to install the pyaudio with conda.Installation of pyaudio using conda (Not Worked)
PIP & Python version
Installation of pyaudio using pip (Worked)
Collecting pipwin
Downloading pipwin-0.5.1.tar.gz (8.8 kB)
Collecting docopt
Downloading docopt-0.6.2.tar.gz (25 kB)
Collecting requests
Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 215 kB/s
Collecting pyprind
Downloading PyPrind-2.11.3-py2.py3-none-any.whl (8.4 kB)
Collecting six
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting beautifulsoup4>=4.9.0
Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
|████████████████████████████████| 115 kB 726 kB/s
Collecting js2py
Downloading Js2Py-0.71-py3-none-any.whl (1.0 MB)
|████████████████████████████████| 1.0 MB 437 kB/s
Collecting packaging
Downloading packaging-20.9-py2.py3-none-any.whl (40 kB)
|████████████████████████████████| 40 kB 325 kB/s
Collecting pySmartDL>=1.3.1
Downloading pySmartDL-1.3.4-py3-none-any.whl (20 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
|████████████████████████████████| 153 kB 939 kB/s
Collecting certifi>=2017.4.17
Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
|████████████████████████████████| 147 kB 731 kB/s
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
|████████████████████████████████| 58 kB 490 kB/s
Collecting chardet<5,>=3.0.2
Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
|████████████████████████████████| 178 kB 1.1 MB/s
Collecting soupsieve>1.2; python_version >= "3.0"
Downloading soupsieve-2.2.1-py3-none-any.whl (33 kB)
Collecting tzlocal>=1.2
Downloading tzlocal-2.1-py2.py3-none-any.whl (16 kB)
Collecting pyjsparser>=2.5.1
Downloading pyjsparser-2.7.1.tar.gz (24 kB)
Collecting pyparsing>=2.0.2
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 554 kB/s
Collecting pytz
Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
|████████████████████████████████| 510 kB 312 kB/s
Building wheels for collected packages: pipwin, docopt, pyjsparser
Building wheel for pipwin (setup.py) ... done
Created wheel for pipwin: filename=pipwin-0.5.1-py2.py3-none-any.whl size=8778 sha256=4aaf92ba5a0db65437114eb0816852464ebfc3d976e7db2cafc3ca41037572ce
Stored in directory: c:\users\hai\appdata\local\pip\cache\wheels\ee\cc\6a\8ea3d6061d20d2ce4d82c27382afb240ae0c24a52a05d7ea64
Building wheel for docopt (setup.py) ... done
Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13705 sha256=3e12894263113dfc17882b03d5cbd72aca65be05ce2d91724ff9bcf8ae2a3fa4
Stored in directory: c:\users\hai\appdata\local\pip\cache\wheels\70\4a\46\1309fc853b8d395e60bafaf1b6df7845bdd82c95fd59dd8d2b
Building wheel for pyjsparser (setup.py) ... done
Created wheel for pyjsparser: filename=pyjsparser-2.7.1-py3-none-any.whl size=25998 sha256=b40f3a40a4837ff4b87e6783ee77aff7741242c14cbfaac048473b913ca2d37c
Stored in directory: c:\users\hai\appdata\local\pip\cache\wheels\f0\70\61\f42dc45dcf0fbe8c495ce579b04730787081499bfb5b8bc60e
Successfully built pipwin docopt pyjsparser
pySmartDL, pipwin
Successfully installed beautifulsoup4-4.9.3 certifi-2020.12.5 chardet-4.0.0 docopt-0.6.2 idna-2.10 js2py-0.71 packaging-20.9 pipwin-0.5.1 pySmartDL-1.3.4 pyjsparser-2.7.1 pyparsing-2.4.7 pyprind-2.11.3 pytz-2021.1 requests-2.25.1 six-1.15.0 soupsieve-2.2.1 tzlocal-2.1 urllib3-1.26.4
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the 'c:\python\python.exe -m pip install --upgrade pip' command.
PS E:\Mini_project\Speech_asst>
PS E:\Mini_project\Speech_asst>
PS E:\Mini_project\Speech_asst>
PS E:\Mini_project\Speech_asst> pipwin install pyaudio
Building cache. Hang on . . .
Done
Package `pyaudio` found in cache
Downloading package . . .
https://download.lfd.uci.edu/pythonlibs/w4tscw6k/PyAudio-0.2.11-cp39-cp39-win32.whl
PyAudio-0.2.11-cp39-cp39-win32.whl
[*] 94 kB / 94 kB @ 36 kB/s [##################] [100%, 0s left]
Processing c:\users\hai\pipwin\pyaudio-0.2.11-cp39-cp39-win32.whl
Successfully installed PyAudio-0.2.11
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the 'c:\python\python.exe -m pip install --upgrade pip' command.
Comments
Post a Comment