I need an automatic speech transcription tool for my video editing project. I am using python speech recognition library. To split big audio file into small fractions I installed pydub and added its functionality in my script. Although I checked and solved the env-path issues of ffmpeg it still giving the following error:
Traceback (most recent call last):
File "..\VideoEditing\speech_transcript.py", line 4, in <module>
from pydub import AudioSegment
ModuleNotFoundError: No module named 'pydub'
What could be done to solve this issue, any ideas?
Many thanks..
Finally I found the solution. Just changed the directory of the downloaded package of pydub to:
"C:\Users\Username\AppData\Local\Programs\Python\Python36\Lib\site-packages".
Many thanks.
Related
I was following along a tutorial where they used the SpeechRecognition module, but when I made it to the first test it returns C:\Users\USER\PycharmProjects\Fatawi\venv\Scripts\python.exe C:/Users/USER/PycharmProjects/Fatawi/main.py Traceback (most recent call last): File "C:\Users\USER\PycharmProjects\Fatawi\main.py", line 1, in <module> import speech_recognition as sr ModuleNotFoundError: No module named 'speech_recognition'
I've tried reinstalling the library multiple times along with the PyAudio library. I ran the test that PyPi has for it and it works, but I don't know how fix it from here.
Check your python interpreter environment (the python version that's run the python file) maybe it's not the same version as python when you downloaded Speech Recognition.
Check if you activating the environemt.
For better understand see this blog in geeks for geeks might help you.
So aftergoing through some of the settings of the project file and checking the Python Interpreter it didn't have the SpeechRecognition Package. So I'm assuming that something went wrong with the install.
Thank you Faisal Faraj for the help.
I am trying to make a bot that responds to certain question asked like ‘what is the time’ . I am trying to use pyttsx3 module to make it work but this error is coming:
Traceback (most recent call last):
File "/Users/HarAd MAC/Desktop/Projects/Python_Work/bot.py", line 1, in <module>
import pyttsx
ImportError: No module named pyttsx3
I have download the module and checked it in VS code Terminal. It is also showing Requirement already satisfied. Can someone help me in this problem. Same error was shown when I was trying to run it in pycharm. These type of problems have also occurred when using modules that have to be download manually.
I am using MacBook Air big Sur and python 3.9.
Thanks.
I don't know for sure but I believe when your import the library you have to do import pyttsx3 while what you were doing is import pyttsx. Here's some more info on usage and how to import
I am currently trying to install a python module named "pyvjoy" (https://github.com/tidzo/pyvjoy) but I run into an error after importing
here's the error:
Traceback (most recent call last):
File "runner.py", line 5, in
import PlayHelper
File "C:\Users\Slay\Desktop\RLBot-master\PlayHelper.py", line 1, in
import pyvjoy
ModuleNotFoundError: No module named 'pyvjoy'
I have tried to install it via copying the library to C:\Python27\Lib\site-packages but no luck
1) You should be using a package manager instead of manually managing every package. Corollary: never use peoples code that isnt on pipy or conda, it means they havent gone through the effort to publish it and dont really expect anyone to use it.
2) You might like pygame or Tkinter for getting joystick input. Mature libraries that have been around for a while are almost always better then some dudes github project with 13 commits.
I successfully installed dlib for python, following instructions here. However, when I try to import the library I get this message:
>>> import dlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/dlib/__init__.py", line 1, in <module>
from .dlib import *
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/dlib/dlib.so, 2): Library not loaded: #rpath/libpng16.16.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/dlib/dlib.so
Reason: image not found
I previously had(and uninstalled) anaconda and had the same issue in python 3.6. Looking at similar questions and responses it sounds like I would have to use install_name_tool command. However I do not know what the new path would be. I do not quite understand why this is necessary either. From what I know, the path that was referenced should have been fine. Why will dlib not import and what can I do to make it import successfully? Let me know. Thanks
I don't know if I would call this a solution, since I still have issues, but what I did was: install_name_tool -change #rpath/libpng16.16.dylib "/Library/Python/2.7/site-packages/dlib/dlib.so" /usr/local/lib/python2.7/site-packages/dlib/dlib.so
Although there was an additional problem with my installation, this fixed the problem at hand. I had dlib in my default python library rather than with a path similar to one in my virtual machine. So I changed the path to fit my VM and all my other installation packages(e.g boost and cmake)
I am trying to work with OpenCV in Python 2.7, however when I simply import cv2, I am getting this error:
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cv2.py", line 9, in <module>
from VideoCapturePlayer import *
ImportError: No module named VideoCapturePlayer
I figured that VideoCapturePlayer may be in pygame or pycam, but when I import both, no problems arise.
I have searched my folders and the web for VideoCapturePlayer. My folders do not contain it, and the internet provided a .py file, but I do not know where I should put it. Any help is greatly appreciated, thank you.
Edit: I guess I should include that I am on Windows 7 64-bit
The link you provided is for downloading the entire OpenCV project, including all the libraries and bindings for C++, Java, etc. etc. For the Python bindings, it's much easier to visit my favorite module site on the Internet, Christoph Gohlke's Python Extension Packages for Windows repository. Find the OpenCV section, pick AMD64 or Win32, pick py2.7 or py2.6, and wait a bit for the self-extracting archive to download. Run it, hit OK for all the prompts, and you should be all set. Fire up IDLE or run python from the command line, and running import cv2 should give you no response at all - indicating that everything got set up just fine.
Good luck!