Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError when trying to use whisper_mic.py #36

Open
Dekriel opened this issue Jul 15, 2023 · 5 comments
Open

ModuleNotFoundError when trying to use whisper_mic.py #36

Dekriel opened this issue Jul 15, 2023 · 5 comments

Comments

@Dekriel
Copy link

Dekriel commented Jul 15, 2023

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
@mallorbc
Copy link
Owner

You need to install this as a pip package and then use it as a CLI.

  1. pip install whisper-mic
    2.whisper_mic

@Shaikhyunus7039
Copy link

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.

@mallorbc
Copy link
Owner

mallorbc commented Sep 4, 2023

If you install this as a pip package, is it working?

@yattuLizard
Copy link

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.

@Kenji0510
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants