gemelo-ai / vocos

Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis
https://gemelo-ai.github.io/vocos/
MIT License
771 stars 88 forks source link

Import error when loading vocos #15

Closed jseo0703 closed 11 months ago

jseo0703 commented 1 year ago

I'm trying to import "vocos" module, but I'm getting the following traceback error. Is there anyone who can help me solve this issue? fyi, all dependencies are installed and I just want to try inference with pretrained models. Thanks in advance.

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 1
----> 1 from vocos import Vocos

File ~/conda/codec/lib/python3.8/site-packages/vocos/__init__.py:1
----> 1 from vocos.pretrained import Vocos
      4 __version__ = "0.0.3"

File ~/conda/codec/lib/python3.8/site-packages/vocos/pretrained.py:7
      5 from huggingface_hub import hf_hub_download
      6 from torch import nn
----> 7 from vocos.feature_extractors import FeatureExtractor, EncodecFeatures
      8 from vocos.heads import FourierHead
      9 from vocos.models import Backbone

File ~/conda/codec/lib/python3.8/site-packages/vocos/feature_extractors.py:8
      5 from encodec import EncodecModel
      6 from torch import nn
----> 8 from vocos.modules import safe_log
     11 class FeatureExtractor(nn.Module):
     12     """Base class for feature extractors."""

File ~/conda/codec/lib/python3.8/site-packages/vocos/modules.py:89
     85         x = x * scale + shift
...
    112     ):
    113         super().__init__()
    114         self.lrelu_slope = lrelu_slope

TypeError: 'type' object is not subscriptable
egorsmkv commented 1 year ago

Use Python 3.10