SWivid / F5-TTS

Official code for "F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching"
https://arxiv.org/abs/2410.06885
MIT License
5.52k stars 565 forks source link

ModuleNotFoundError: No module named 'encodec.model' #169

Closed dzehme closed 2 days ago

dzehme commented 1 week ago

I am running on Windows. Using pyenv to set up a virtual environment and Python 3.10.11. I ran the two commands for installing pytorch and then ran the command to install requirements.txt. All of that went without errors.

(venv) C:\ai\F5-TTS>python gradio_app.py
Traceback (most recent call last):
  File "C:\ai\F5-TTS\gradio_app.py", line 8, in <module>
    from vocos import Vocos
  File "C:\ai\F5-TTS\venv\lib\site-packages\vocos\__init__.py", line 1, in <module>
    from vocos.pretrained import Vocos
  File "C:\ai\F5-TTS\venv\lib\site-packages\vocos\pretrained.py", line 9, in <module>
    from vocos.feature_extractors import FeatureExtractor, EncodecFeatures
  File "C:\ai\F5-TTS\venv\lib\site-packages\vocos\feature_extractors.py", line 5, in <module>
    from encodec import EncodecModel
  File "C:\ai\F5-TTS\venv\lib\site-packages\encodec\__init__.py", line 12, in <module>
    from .model import EncodecModel
ModuleNotFoundError: No module named 'encodec.model'

It does hesitate for a few seconds before outputting this error.

Here are the list of installed packages:

(venv) C:\ai\F5-TTS>pip list
Package                  Version
------------------------ ------------
accelerate               1.0.1
aiofiles                 23.2.1
aiohappyeyeballs         2.4.3
aiohttp                  3.10.10
aiosignal                1.3.1
annotated-types          0.7.0
anyio                    4.6.2.post1
async-timeout            4.0.3
attrs                    24.2.0
audioread                3.0.1
boto3                    1.35.44
botocore                 1.35.44
cached_path              1.6.3
cachetools               5.5.0
certifi                  2024.8.30
cffi                     1.17.1
charset-normalizer       3.4.0
click                    8.1.7
colorama                 0.4.6
contourpy                1.3.0
cycler                   0.12.1
datasets                 3.0.1
decorator                5.1.1
dill                     0.3.8
docker-pycreds           0.4.0
einops                   0.8.0
einx                     0.3.0
ema-pytorch              0.7.0
encodec                  0.1.1
exceptiongroup           1.2.2
fastapi                  0.115.2
ffmpy                    0.4.0
filelock                 3.13.4
fonttools                4.54.1
frozendict               2.4.6
frozenlist               1.4.1
fsspec                   2024.6.1
gitdb                    4.0.11
GitPython                3.1.43
google-api-core          2.21.0
google-auth              2.35.0
google-cloud-core        2.4.1
google-cloud-storage     2.18.2
google-crc32c            1.6.0
google-resumable-media   2.7.2
googleapis-common-protos 1.65.0
gradio                   4.44.1
gradio_client            1.3.0
h11                      0.14.0
httpcore                 1.0.6
httpx                    0.27.2
huggingface-hub          0.23.5
idna                     3.10
importlib_resources      6.4.5
intel-openmp             2021.4.0
jieba                    0.42.1
Jinja2                   3.1.4
jmespath                 1.0.1
joblib                   1.4.2
kiwisolver               1.4.7
lazy_loader              0.4
librosa                  0.10.2.post1
llvmlite                 0.43.0
markdown-it-py           3.0.0
MarkupSafe               2.1.5
matplotlib               3.9.2
mdurl                    0.1.2
mkl                      2021.4.0
mpmath                   1.3.0
msgpack                  1.1.0
multidict                6.1.0
multiprocess             0.70.16
networkx                 3.4.1
numba                    0.60.0
numpy                    1.26.4
orjson                   3.10.7
packaging                24.1
pandas                   2.2.3
pillow                   10.4.0
pip                      23.0.1
platformdirs             4.3.6
pooch                    1.8.2
propcache                0.2.0
proto-plus               1.24.0
protobuf                 5.28.2
psutil                   6.1.0
pyarrow                  17.0.0
pyasn1                   0.6.1
pyasn1_modules           0.4.1
pycparser                2.22
pydantic                 2.9.2
pydantic_core            2.23.4
pydub                    0.25.1
Pygments                 2.18.0
pyparsing                3.2.0
pypinyin                 0.53.0
python-dateutil          2.9.0.post0
python-multipart         0.0.12
pytz                     2024.2
PyYAML                   6.0.2
regex                    2024.9.11
requests                 2.32.3
rich                     13.9.2
rsa                      4.9
ruff                     0.7.0
s3transfer               0.10.3
safetensors              0.4.5
scikit-learn             1.5.2
scipy                    1.14.1
semantic-version         2.10.0
sentry-sdk               2.17.0
setproctitle             1.3.3
setuptools               65.5.0
shellingham              1.5.4
six                      1.16.0
smmap                    5.0.1
sniffio                  1.3.1
soundfile                0.12.1
soxr                     0.5.0.post1
starlette                0.40.0
sympy                    1.13.3
tbb                      2021.13.1
threadpoolctl            3.5.0
tokenizers               0.20.1
tomli                    2.0.2
tomlkit                  0.12.0
torch                    2.3.0+cu118
torchaudio               2.3.0+cu118
torchdiffeq              0.2.4
tqdm                     4.66.5
transformers             4.45.2
typer                    0.12.5
typing_extensions        4.12.2
tzdata                   2024.2
urllib3                  2.2.3
uvicorn                  0.32.0
vocos                    0.1.0
wandb                    0.18.5
websockets               12.0
x-transformers           1.40.2
xxhash                   3.5.0
yarl                     1.15.5

[notice] A new release of pip is available: 23.0.1 -> 24.2
[notice] To update, run: python.exe -m pip install --upgrade pip
ZhikangNiu commented 6 days ago

Maybe you can use Dockerfile

SWivid commented 2 days ago

will close this issue, feel free to open if further questions.