Closed gety9 closed 6 months ago
from speechlib import Transcriptor
afl = str(adir) + '/' + stm + '.mp3'
vcd = ''
lng = 'en'
logd = str(GDDIR) + '/' + 'logs'
mdlsz = 'large'
qntzt = False
transcriptor = Transcriptor(afl, logd, lng, mdlsz, vcd, qntzt)
res = transcriptor.transcribe()
---------------------------------------------------------------------------
ContextualVersionConflict Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/lightning_utilities/core/imports.py](https://localhost:8080/#) in _check_requirement(self)
131 # first try the pkg_resources requirement
--> 132 pkg_resources.require(self.requirement)
133 self.available = True
27 frames
ContextualVersionConflict: (torch 2.1.2 (/usr/local/lib/python3.10/dist-packages), Requirement.parse('torch==2.2.1'), {'torchvision'})
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/torch/_custom_op/impl.py](https://localhost:8080/#) in error_not_found()
1050 def get_op(qualname):
1051 def error_not_found():
-> 1052 raise ValueError(
1053 f"Could not find the operator {qualname}. Please make sure you have "
1054 f"already registered the operator and (if registered from C++) "
ValueError: Could not find the operator torchvision::nms. Please make sure you have already registered the operator and (if registered from C++) loaded it via torch.ops.load_library.
I tried upgrading torch, then after i need to upgrade torchaudio. And it leads to yet another error...
With !pip install speechlib torchvision==0.13.1
(solution suggested by colab bot)
getting following error
from speechlib import Transcriptor
afl = str(adir) + '/' + stm + '.mp3'
vcd = ''
lng = 'en'
logd = str(GDDIR) + '/' + 'logs'
mdlsz = 'large'
qntzt = False
transcriptor = Transcriptor(afl, logd, lng, mdlsz, vcd, qntzt)
res = transcriptor.transcribe()
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
[<ipython-input-2-bb75dc4f1c63>](https://localhost:8080/#) in <cell line: 1>()
----> 1 from speechlib import Transcriptor
2
3 afl = str(adir) + '/' + stm + '.mp3'
4 vcd = ''
5 lng = 'en'
18 frames
[/usr/lib/python3.10/ctypes/__init__.py](https://localhost:8080/#) in __init__(self, name, mode, handle, use_errno, use_last_error, winmode)
372
373 if handle is None:
--> 374 self._handle = _dlopen(self._name, mode)
375 else:
376 self._handle = handle
OSError: /usr/local/lib/python3.10/dist-packages/torchtext/lib/libtorchtext.so: undefined symbol: _ZN5torch3jit21setUTF8DecodingIgnoreEb
code does not have to change. colab comes with pre-installed packages and you have to restart runtime to use newly installed packages. then everything works fine.
Hi, using the speechlib_run notebook exemple i got this after the runtime restart.
AttributeError Traceback (most recent call last)
[<ipython-input-4-ab51f10e0462>](https://if67c8k0o8n-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20240326-060120_RC00_619136293#) in <cell line: 1>()
----> 1 from speechlib import Transcriptor
2
3 file = "obama_zach.wav" # replace with your own
4 voices_folder = "voices" # replace with your own
5 language = "en"
12 frames
[/usr/local/lib/python3.10/dist-packages/torchvision/_meta_registrations.py](https://if67c8k0o8n-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20240326-060120_RC00_619136293#) in wrapper(fn)
16 def register_meta(op_name, overload_name="default"):
17 def wrapper(fn):
---> 18 if torchvision.extension._has_ops():
19 get_meta_lib().impl(getattr(getattr(torch.ops.torchvision, op_name), overload_name), fn)
20 return fn
AttributeError: partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)
i have added a cell to delete torch, torchvision, torchaudio, torchdata, torchsummary, torchtext. speechlib is installing torch and pre-installed packages will not conflict with it anymore.
you still have to restart after installing packages.
I use speechlib on google colab. It was working fine when i set it up on Jan 22, but now i try to reuse same code and it fails: