whisper_mic
whisper_mic copied to clipboard
ModuleNotFoundError when trying to use whisper_mic.py
I tried running python whisper_mic.py --help
on the CLI and was met with an error.
C:\Users\[___]\anaconda3\envs\whisper\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Traceback (most recent call last):
File "C:\Users\[___]\pythonprojects\Amadeus\whisper_mic\whisper_mic\whisper_mic.py", line 14, in <module>
from whisper_mic.utils import get_logger
File "C:\Users\[___]\pythonprojects\Amadeus\whisper_mic\whisper_mic\whisper_mic.py", line 14, in <module>
from whisper_mic.utils import get_logger
ModuleNotFoundError: No module named 'whisper_mic.utils'; 'whisper_mic' is not a package
You need to install this as a pip package and then use it as a CLI.
-
pip install whisper-mic
2.whisper_mic
I tried running
python whisper_mic.py --help
on the CLI and was met with an error.C:\Users\[___]\anaconda3\envs\whisper\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) Traceback (most recent call last): File "C:\Users\[___]\pythonprojects\Amadeus\whisper_mic\whisper_mic\whisper_mic.py", line 14, in <module> from whisper_mic.utils import get_logger File "C:\Users\[___]\pythonprojects\Amadeus\whisper_mic\whisper_mic\whisper_mic.py", line 14, in <module> from whisper_mic.utils import get_logger ModuleNotFoundError: No module named 'whisper_mic.utils'; 'whisper_mic' is not a package
you have to put 'whisper_mic' folder in the same folder where your code is, i was having the same issue.
If you install this as a pip package, is it working?
The problem is that the module you are trying to run is named whisper_mic.py. Line 15 says “from whisper_mic.utils import get_logger”, so the module name conflicts with the package name.Need to rename whisper_mic.py. Please do not change whisper_mic.py in the library.
The problem is that the module you are trying to run is named whisper_mic.py. Line 15 says “from whisper_mic.utils import get_logger”, so the module name conflicts with the package name.Need to rename whisper_mic.py. Please do not change whisper_mic.py in the library.
It was easy problem! Thank you!
I believe this is done. Please reopen if not.