Pocket sphinx and virtual assistant - python-3.x

I am trying to do a virtual assistant as my major project. So I want to install pocket sphinx package to run this offline. If anyone know this please answer to this.

I thing you are using pocketsphinx for speech to text conversion. If its so pocketsphinx package used to convert speech into text(offline as well) in Python.
Below comments is used to installing the packages.
pip install SpeechRecognition
conda install swig
pip install pocketsphinx
Once Installing pocketsphinx you may get the error like "Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ please install "Microsoft Visual C++ 14.0" then do "pip install pocketsphinx" Once installed the above packages you can start testing some ".wav" file for speech to text conversion.
import speech_recognition as sr
AUDIO_FILE='C:\\Users\\Downloads\\test.wav'
r=sr.Recognizer()
with sr.AudioFile(AUDIO_FILE) as source:
audio=r.record(source)
text=r.recognize_sphinx(audio)
with open("result.txt","w") as text_file:
text_file.write(format(text))

Related

experiencing error while installing flair

Im experiencing this error while running the command pip install flair
building 'gensim.models.word2vec_inner' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for gensim
I am running this command inside a conda environment. I was able to successfully install flair before. then i uninstalled miniconda, installed it on a separate drive (on the same pc) and tried installing flair again, thus here we are.
any help on how to resolve this will be greatly appreciated.

How to install dlib in linux offline?

I have a linux server can not link the Internet and I wand to install dlib in my anaconda enviroment. But I do not know how to install cmake and boost for python? can any one help me? thx
You can't install Dlib directly without cmake and visual studio
First Download the CMake installer and install it from 'https://cmake.org/download/'
Add CMake executable path to the Enviroment Variables:
set PATH="%PATH%;C:\Program Files\CMake\bin"
Then "pip install CMake"
Install Visual Studio build tools from 'https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15#'
In Visual Studio 2017 go to the Individual Components tab, Visual C++ Tools for Cmake, and check the checkbox under the "Compilers, build tools and runtimes" section.
The at last "pip install dlib"
It definitely works., have a try :)

ModuleNotFoundError: No module named 'misaka'

In python misaka module not able to install while installing pip install misaka showing download error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Vi
sual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
please suggest the above solution. i checked python version for system 64 same is there.
use following code in your cmd
pip install misaka
to install miska library
some example
from misaka import Markdown, HtmlRenderer
rndr = HtmlRenderer()
md = Markdown(rndr)
print(md('some text'))
Working solution!
Go to https://visualstudio.microsoft.com/downloads/ scroll down one page and download Visual Studio 2017 community.
Go through following link to download the required components for Microsoft Visual C++ 14.0, the link provides what components to be selected while downloading.
https://developercommunity.visualstudio.com/content/problem/409173/error-microsoft-visual-c-140-is-required.html
Once the download finishes, you will be asked to restart your system.
Having restarted your system, type
pip install django-misaka
Hope it works as it worked for me!
you should have install the module using pip
pip install django-misaka

Is it Possible to Install face_recognition in python 2.7 rather than python 3.5?

I tried to install face recognition in python 2.7.but i am getting the below errorenter image description here
Can you install CMake from the below given link and then try again? It seems CMake which is needed to build the dlib extension is missing on your system.
You can download and install CMake from here:
https://cmake.org/download/
Possible ., python 2.7 provide more features to face recognition than python 3.5 version
we can use pip installer to install all of the packages andexecute it

How to resolve the spacy package installation error

I am using python3.5.2 on windows server. I have tried to install spacy package in my virtual environment on windows. While tring to install spacy with the command using pip, am getting the error Microsoft Visual C++ 14.0 is required. I have installed that too. But getting the same issue. Please help me solve this issue and install the spacy package
Most probably its asking for Visual Studio C++ Build tools now, at least that was my case. So I installed it and ran vcvarsall.bat from
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat
After which I could install SpaCy.

Resources