question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

running deeppavlov transcribe

See original GitHub issue

Hi everybody,

I am trying to run a transcribe model on google colab, as:

from deeppavlov import build_model, configs

model = build_model(configs.nemo.asr)
text_batch = model("my_path")

I had an initial problem with model=build_model(configs.nemo.asr) because model nemo was not found, even if it was installed. Thus I solved this issue installing nemo from Nvidia repository as: !pip install git+https://github.com/NVIDIA/NeMo.git However, I am facing this new issue:

2020-05-11 10:47:37.536 ERROR in 'deeppavlov.core.common.params'['params'] at line 112: Exception in <class 'deeppavlov.models.nemo.asr.NeMoASR'>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/deeppavlov/core/common/params.py", line 106, in from_params
    component = obj(**dict(config_params, **kwargs))
  File "/usr/local/lib/python3.6/dist-packages/deeppavlov/models/nemo/asr.py", line 163, in __init__
    **self.nemo_params['AudioToMelSpectrogramPreprocessor']
  File "/usr/local/lib/python3.6/dist-packages/nemo/collections/asr/audio_preprocessing.py", line 362, in __init__
    super().__init__(n_window_size, n_window_stride)
  File "/usr/local/lib/python3.6/dist-packages/nemo/collections/asr/audio_preprocessing.py", line 74, in __init__
    super().__init__()
  File "/usr/local/lib/python3.6/dist-packages/nemo/backends/pytorch/nm.py", line 136, in __init__
    NeuralModule.__init__(self, name)  # For NeuralModule API
  File "/usr/local/lib/python3.6/dist-packages/nemo/core/neural_modules.py", line 70, in __init__
    super().__init__()
  File "/usr/local/lib/python3.6/dist-packages/nemo/core/neural_interface.py", line 41, in __init__
    self._app_state = nemo.utils.app_state.AppState()
  File "/usr/local/lib/python3.6/dist-packages/nemo/utils/metaclasses.py", line 36, in __call__
    cls.__instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/nemo/utils/app_state.py", line 43, in __init__
    self._device = nemo.core.DeviceType.GPU
AttributeError: module 'nemo' has no attribute 'core'

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-54-5e369d1d15ef> in <module>()
----> 1 model = build_model(configs.nemo.asr)

9 frames
/usr/local/lib/python3.6/dist-packages/nemo/utils/app_state.py in __init__(self, device)
     41         # Had to set it to None in argument to avoid circular import at the class initialization phase.
     42         if device is None:
---> 43             self._device = nemo.core.DeviceType.GPU
     44         else:
     45             self._device = device

AttributeError: module 'nemo' has no attribute 'core'

Should I install nemo in some other way or is there a solution for this? Thanks very much

Stefano

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Stebosscommented, May 12, 2020

Ouch that’s great. Now it works fine I just changed the title of the issue, so it’s better and more related to what discussed. Thanks very much @IgnatovFedor I am closing the issue

0reactions
IgnatovFedorcommented, May 11, 2020

@Steboss, as mentioned in documentation, models work with single channel wav files. This error is most likely occurs due to your file is multi-channel. If linee_test.wav is multi channel, you could create single channel version using following code:

from scipy.io.wavfile import read, write
sr, data = read('linee_test.wav')
with open('linee_test_mono.wav', 'wb') as fout:
    write(fout, sr, data[:, 0])
Read more comments on GitHub >

github_iconTop Results From Across the Web

running deeppavlov transcribe · Issue #1206
Hi everybody, I am trying to run a transcribe model on google colab, as: from deeppavlov import build_model, configs model ...
Read more >
Building a Simple AI Assistant with DeepPavlov and ...
DeepPavlov's nemo_asr pipeline transcribes speech batches through its own data layer and NeMo ASR's pre- Figure 1. NeMo ASR modules are ...
Read more >
QuickStart — DeepPavlov 1.0.1 documentation
To run or train PyTorch-based DeepPavlov models on GPU you should have CUDA installed on your host machine, and install model's package requirements....
Read more >
deeppavlov
DeepPavlov is an open-source conversational AI library built on PyTorch. ... To run supported DeepPavlov models on GPU you should have CUDA compatible...
Read more >
DeepPavlov: Open-source Conversational AI Library for Chatbot
To run supported DeepPavlov models on GPU you should have CUDA 10.0 installed on your host machine and TensorFlow with GPU support (...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found