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

ImportError: cannot import name 'configuration' from 'tsutils' #186

Closed
iAmAnyus opened this issue Mar 23, 2024 · 5 comments
Closed

ImportError: cannot import name 'configuration' from 'tsutils' #186

iAmAnyus opened this issue Mar 23, 2024 · 5 comments

Comments

@iAmAnyus
Copy link

The following error occurred when running Python main.py:
ImportError: cannot import name 'configuration' from 'tsutils'
My Python version is 3.11

@iAmAnyus
Copy link
Author

ImportError: cannot import name 'configuration' from 'tsutils' (F:\PyCharm\py\Lib\site-packages\tsutils_init_.py)

@iAmAnyus
Copy link
Author

and The following error occurred if i running Python main.py in env:
[INFO] Using default microphone.
[INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic...
[INFO] Completed ambient noise adjustment for Default Mic.
[INFO] Using default speaker.
[INFO] Listening to sound from Speaker: #21 - 耳机 (Redmi Buds 3 青春版 Stereo) [Loopback]
Could not find the transcription model file: F:\information security\PyCharm\pythonProject\transcribe\app\transcribe./models/base.pt
Downloading file: https://openaipublic.azureedge.net/main/whisper/models/ed3a0b6b1c0edf879ad9b11b1af5a0e6ab5db9205f891f668f8b0e6c6326e34e/base.pt
Failed to download the file: https://openaipublic.azureedge.net/main/whisper/models/ed3a0b6b1c0edf879ad9b11b1af5a0e6ab5db9205f891f668f8b0e6c6326e34e/base.pt
Traceback (most recent call last):
File "F:\information security\PyCharm\pythonProject\transcribe\app\transcribe\main.py", line 125, in
main()
File "F:\information security\PyCharm\pythonProject\transcribe\app\transcribe\main.py", line 32, in main
au.create_transcriber(name=args.speech_to_text,
File "F:\information security\PyCharm\pythonProject\transcribe\app\transcribe\app_utils.py", line 150, in create_transcriber
model = model_factory.get_stt_model_instance(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\information security\PyCharm\pythonProject\transcribe\app\transcribe../..\sdk\transcriber_models.py", line 43, in get_stt_model_instance
return WhisperSTTModel(stt_model_config=stt_model_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\information security\PyCharm\pythonProject\transcribe\app\transcribe../..\sdk\transcriber_models.py", line 80, in init
self.audio_model = whisper.load_model(self.model_filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\information security\PyCharm\pythonProject\transcribe\env\Lib\site-packages\whisper_init_.py", line 139, in load_model
raise RuntimeError(
RuntimeError: Model F:\information security\PyCharm\pythonProject\transcribe\app\transcribe./models/base.pt not found; available models = ['tiny.en', 'tiny', 'base.en', 'base', 'small.en', 'small', 'medium.en', 'medium', 'large-v1', 'large-v2', 'large-v3', 'large']

@j0n0w1ns
Copy link
Collaborator

ImportError: cannot import name 'configuration' from 'tsutils'

The initial errors seems to be related to environment configuration. Looks like you resolved it.
Would be great to share here what needed to be done to resolve the issue

For the last error where cannot download the file
https://openaipublic.azureedge.net/main/whisper/models/ed3a0b6b1c0edf879ad9b11b1af5a0e6ab5db9205f891f668f8b0e6c6326e34e/base.pt
Are you able to download this file using a browser

@iAmAnyus
Copy link
Author

the problem is done,thank you!

@mang0sw33t
Copy link
Collaborator

It for sure is done with a few of the ancillary ones

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

4 participants