NeMo icon indicating copy to clipboard operation
NeMo copied to clipboard

Error running transcribe_speech.py

Open sruckh opened this issue 7 months ago • 2 comments

Describe the bug

Error executing job with overrides: []
Traceback (most recent call last):
  File "/workspace/NeMo/examples/asr/transcribe_speech.py", line 228, in main
    raise ValueError("Both cfg.model_path and cfg.pretrained_name cannot be None!")
ValueError: Both cfg.model_path and cfg.pretrained_name cannot be None!

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace

Traceback (most recent call last):
  File "/workspace/NeMo/examples/asr/transcribe_speech.py", line 492, in <module>
    main()  # noqa pylint: disable=no-value-for-parameter
  File "/workspace/miniconda3/envs/nemo/lib/python3.10/site-packages/nemo/core/config/hydra_runner.py", line 129, in wrapper
    _run_hydra(
  File "/workspace/miniconda3/envs/nemo/lib/python3.10/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/workspace/miniconda3/envs/nemo/lib/python3.10/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/workspace/miniconda3/envs/nemo/lib/python3.10/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
    raise ex
  File "/workspace/miniconda3/envs/nemo/lib/python3.10/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
  File "/workspace/miniconda3/envs/nemo/lib/python3.10/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/workspace/miniconda3/envs/nemo/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 132, in run
    _ = ret.return_value
  File "/workspace/miniconda3/envs/nemo/lib/python3.10/site-packages/hydra/core/utils.py", line 260, in return_value
    raise self._return_value
  File "/workspace/miniconda3/envs/nemo/lib/python3.10/site-packages/hydra/core/utils.py", line 186, in run_job
    ret.return_value = task_function(task_cfg)
  File "/workspace/NeMo/examples/asr/transcribe_speech.py", line 228, in main
    raise ValueError("Both cfg.model_path and cfg.pretrained_name cannot be None!")
ValueError: Both cfg.model_path and cfg.pretrained_name cannot be None!

A clear and concise description of what the bug is.

Set up the environment as suggested with conda. Ran pip install nemo_toolkit['asr']. Cloned the repo. Changed to the examples/ast directory and tried to run python transcribe_speech.py. Used 3 different GPU models to see if it made a difference, and it did not.

Steps/Code to reproduce bug

On Unbuntu 22.04, (I am using Runpod), run the exact commands as documented on the github page.

Please list minimal steps or code snippet for us to be able to reproduce the bug.

Nothing different than what is in your documentation. One time I did try install the asr from the cloned NeMo directory to see if it made a different, but the results are the same.

A helpful guide on on how to craft a minimal bug report http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports.

Expected behavior From a youtube video I watched this launched a gradio web interface running on port 7860.

A clear and concise description of what you expected to happen.

Environment overview (please complete the following information)

  • Environment location: [Bare-metal, Docker, Cloud(specify cloud provider - AWS, Azure, GCP, Collab)]
  • Runpod with only pytorch installed.
  • Method of NeMo install: [pip install or from source]. Please specify exact commands you used to install.
  • I tried both. I followed the exact instruction from the github page. I only install the 'asr' module.
  • If method of install is [Docker], provide docker pull & docker run commands used

Environment details

If NVIDIA docker image is used you don't need to specify these. Otherwise, please provide:

  • OS version
  • ubuntu 22.04
  • PyTorch version
  • Python version
  • 2.7.0+cu126
  • Python 3.10.12

Additional context

Add any other context about the problem here. Example: GPU model I tried 4090, RTX 6000ADA and, H100SXM

sruckh avatar May 14 '25 03:05 sruckh

Hi @sruckh Which model are you using? Can you share the exact command that you are running? From the error trace it looks like the function is not being passed an appropriate model name or path.

ankitapasad avatar May 14 '25 05:05 ankitapasad

The video I watched did not include passing any parameters. The video also did not show how the environment was configured, so I was doing exactly what is on the github page (setting up conda environment). I am trying to use the newer parakeet-tdt-.6b-v2 model. I looked at the script and I did see there were other options that could be set. So for the particular error mentioned above, I did download the model and put it into a subdirectory called model and added the command line parameter model_path=model/. This did in fact clear the error above, but then another similar error showed up saying the same type of thing like the a particular parameter cannot be null. Since the video I watched did not include any parameters I assumed the gradio app would come up, and the first time you run it, it would automatically download the model. Although the video went to the page where you can download the model, it never showed downloading it or how the model got onto the server. It also did not show how the virtual environment was set up. The YouTube user just said I already have my venv setup and just showed cloning the the repo, installing the the toolkit with only 'asr' and then running the script. In the video the gradio app came up and the user started transcribing audio samples.

sruckh-kubra avatar May 14 '25 19:05 sruckh-kubra

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jun 20 '25 02:06 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Jun 27 '25 02:06 github-actions[bot]