Unable to use Whispercpp and Whisperx on colab #184

Open
opened 2023-03-29 16:46:15 +07:00 by pheonis · 5 comments

When i try to transcribe using the whispercpp and whisperx on colab notebook. I get these "No module name" errors

Something went wrong
No module named 'whispercpp'

Something went wrong
No module named 'whisperx'

Loading specialized model for language: en
Loading Whisper model: tiny.en
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 394, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1075, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 884, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/content/ai-voice-cloning/src/webui.py", line 201, in prepare_dataset_proxy
    message = transcribe_dataset( voice=voice, language=language, skip_existings=skip_existings, progress=progress )
  File "/content/ai-voice-cloning/src/utils.py", line 1359, in transcribe_dataset
    load_whisper_model(language=language)
  File "/content/ai-voice-cloning/src/utils.py", line 2817, in load_whisper_model
    import whisperx
ModuleNotFoundError: No module named 'whisperx'

I can use Openai's whisper models. They are getting downloaded perfectly and transcribe.. But i have hard luck with the other two models.

When i try to transcribe using the whispercpp and whisperx on colab notebook. I get these "**No module name**" errors ``` Something went wrong No module named 'whispercpp' Something went wrong No module named 'whisperx' ``` ``` Loading specialized model for language: en Loading Whisper model: tiny.en Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1075, in process_api result = await self.call_function( File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/content/ai-voice-cloning/src/webui.py", line 201, in prepare_dataset_proxy message = transcribe_dataset( voice=voice, language=language, skip_existings=skip_existings, progress=progress ) File "/content/ai-voice-cloning/src/utils.py", line 1359, in transcribe_dataset load_whisper_model(language=language) File "/content/ai-voice-cloning/src/utils.py", line 2817, in load_whisper_model import whisperx ModuleNotFoundError: No module named 'whisperx' ``` I can use Openai's whisper models. They are getting downloaded perfectly and transcribe.. But i have hard luck with the other two models.

I've never been able to get whispercpp working, so no idea there. For whisperx I would try installing it separately using the instructions in the repo: https://github.com/m-bain/whisperX

I've never been able to get whispercpp working, so no idea there. For whisperx I would try installing it separately using the instructions in the repo: https://github.com/m-bain/whisperX

I installed whisperx and tried again.. Now im getting this error. I have changed all models from tiny to large and on all occasions, this is the error.

Model not found; available models = ['tiny.en', 'tiny', 'base.en', 'base', 'small.en', 'small', 'medium.en', 'medium', 'large-v1', 'large-v2', 'large']

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 394, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1075, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 884, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/content/ai-voice-cloning/src/webui.py", line 202, in prepare_dataset_proxy
    message = transcribe_dataset( voice=voice, language=language, skip_existings=skip_existings, progress=progress )
  File "/content/ai-voice-cloning/src/utils.py", line 1359, in transcribe_dataset
    load_whisper_model(language=language)
  File "/content/ai-voice-cloning/src/utils.py", line 2823, in load_whisper_model
    whisper_model = whisperx.load_model(model_name, device)
  File "/usr/local/lib/python3.9/dist-packages/whisperx/__init__.py", line 105, in load_model
    raise RuntimeError(f"Model {name} not found; available models = {available_models()}")
RuntimeError: Model  not found; available models = ['tiny.en', 'tiny', 'base.en', 'base', 'small.en', 'small', 'medium.en', 'medium', 'large-v1', 'large-v2', 'large']

I installed whisperx and tried again.. Now im getting this error. I have changed all models from tiny to large and on all occasions, this is the error. ``` Model not found; available models = ['tiny.en', 'tiny', 'base.en', 'base', 'small.en', 'small', 'medium.en', 'medium', 'large-v1', 'large-v2', 'large'] ``` ``` Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1075, in process_api result = await self.call_function( File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/content/ai-voice-cloning/src/webui.py", line 202, in prepare_dataset_proxy message = transcribe_dataset( voice=voice, language=language, skip_existings=skip_existings, progress=progress ) File "/content/ai-voice-cloning/src/utils.py", line 1359, in transcribe_dataset load_whisper_model(language=language) File "/content/ai-voice-cloning/src/utils.py", line 2823, in load_whisper_model whisper_model = whisperx.load_model(model_name, device) File "/usr/local/lib/python3.9/dist-packages/whisperx/__init__.py", line 105, in load_model raise RuntimeError(f"Model {name} not found; available models = {available_models()}") RuntimeError: Model not found; available models = ['tiny.en', 'tiny', 'base.en', 'base', 'small.en', 'small', 'medium.en', 'medium', 'large-v1', 'large-v2', 'large'] ```

You can use --model_dir to point it at the location where your model files are stored.

You can use `--model_dir` to point it at the location where your model files are stored.

You can use --model_dir to point it at the location where your model files are stored.

As i mentioned im using colab notebook. No option to set the model_dir inside gradio webui.

> You can use `--model_dir` to point it at the location where your model files are stored. As i mentioned im using colab notebook. No option to set the model_dir inside gradio webui.

I've never used colab notebook; you might want to check out the issue tracker on whisperx's repo and see if someone over there knows.

I've never used colab notebook; you might want to check out the issue tracker on whisperx's repo and see if someone over there knows.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrq/ai-voice-cloning#184
There is no content yet.