Skip to content

Instantly share code, notes, and snippets.

@sw212
Created October 10, 2024 19:09
Show Gist options
  • Save sw212/3415eddb7b10de00b1226c0217165213 to your computer and use it in GitHub Desktop.
Save sw212/3415eddb7b10de00b1226c0217165213 to your computer and use it in GitHub Desktop.
clone:
https://github.com/myshell-ai/MeloTTS
https://github.com/taku910/mecab
-----------------------------------------------------------------------------
install mecab (needs toolchain)
e.g. https://github.com/facebookresearch/LASER/blob/main/install_external_tools.sh#L124
mecab:
FOR HELP:
./configure --help
IF CUSTOM INSTALL DIR, ADD:
--prefix="${HOME}/python/melo/mecab/install" --exec-prefix="${HOME}/python/melo/mecab/install"
INSTALL (maybe need sudo):
./configure --cache-file=config.cache --with-charset=utf8
make
sudo make install
mecab-ipadic:
FOR HELP:
./configure --help
IF CUSTOM INSTALL DIR, ADD:
--prefix="${HOME}/python/melo/mecab/install" --exec-prefix="${HOME}/python/melo/mecab/install"
MAYBE:
--with-mecab-config="${HOME}/python/melo/mecab/install/bin/mecab-config"
./configure --cache-file=config.cache --with-charset=utf8
make
sudo make install
-----------------------------------------------------------------------------
install meloTTS:
used diff requirements.txt:
-----------------------
txtsplit
cached_path
torch==2.2.1
torchaudio==2.2.1
transformers==4.38.1
num2words==0.5.12
unidic_lite==1.0.8
unidic==1.1.0
mecab-python3==1.0.9
pykakasi==2.2.1
fugashi==1.3.0
g2p_en==2.1.0
anyascii==0.3.2
jamo==0.4.1
gruut[de,es,fr]==2.2.3
g2pkk>=0.1.1
librosa==0.9.1
pydub==0.25.1
eng_to_ipa==0.0.2
inflect==7.0.0
unidecode==1.3.7
pypinyin==0.50.0
cn2an==0.5.22
jieba==0.42.1
gradio
langid==1.1.6
tqdm
tensorboard==2.16.2
loguru==0.7.2
-----------------------
THIS LEADS TO (LONG):
-----------------------
absl-py==2.1.0
aiofiles==23.2.1
annotated-types==0.7.0
anyascii==0.3.2
anyio==4.6.0
audioread==3.0.1
babel==2.16.0
boto3==1.35.37
botocore==1.35.37
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
cn2an==0.5.22
contourpy==1.3.0
cycler==0.12.1
dateparser==1.1.8
decorator==5.1.1
Deprecated==1.2.14
Distance==0.1.3
docopt==0.6.2
eng_to_ipa==0.0.2
fastapi==0.115.0
ffmpy==0.4.0
filelock==3.13.4
fonttools==4.54.1
fsspec==2024.9.0
fugashi==1.3.0
g2p-en==2.1.0
g2pkk==0.1.2
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
grpcio==1.66.2
gruut==2.2.3
gruut-ipa==0.13.0
gruut_lang_de==2.0.1
gruut_lang_en==2.0.1
gruut_lang_es==2.0.1
gruut_lang_fr==2.0.2
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
inflect==7.0.0
jaconv==0.4.0
jamo==0.4.1
jieba==0.42.1
Jinja2==3.1.4
jmespath==1.0.1
joblib==1.4.2
jsonlines==1.2.0
kiwisolver==1.4.7
langid==1.1.6
librosa==0.9.1
llvmlite==0.43.0
loguru==0.7.2
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.9.2
mdurl==0.1.2
mecab-python3==1.0.9
melotts @ file:///home/funcantor/python/melo/MeloTTS
mpmath==1.3.0
networkx==2.8.8
nltk==3.9.1
num2words==0.5.12
numba==0.60.0
numpy==1.26.4
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==8.9.2.26
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.19.3
nvidia-nvjitlink-cu12==12.6.77
nvidia-nvtx-cu12==12.1.105
orjson==3.10.7
packaging==24.1
pandas==2.2.3
pillow==10.4.0
plac==1.4.3
platformdirs==4.3.6
pooch==1.8.2
proces==0.1.7
proto-plus==1.24.0
protobuf==5.28.2
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
pykakasi==2.2.1
pyparsing==3.1.4
pypinyin==0.50.0
python-crfsuite==0.9.11
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
resampy==0.4.3
rich==13.9.2
rsa==4.9
ruff==0.6.9
s3transfer==0.10.3
safetensors==0.4.5
scikit-learn==1.5.2
scipy==1.14.1
semantic-version==2.10.0
setuptools==75.1.0
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
soundfile==0.12.1
starlette==0.38.6
sympy==1.13.3
tensorboard==2.16.2
tensorboard-data-server==0.7.2
threadpoolctl==3.5.0
tokenizers==0.15.2
tomlkit==0.12.0
torch==2.2.1
torchaudio==2.2.1
tqdm==4.66.5
transformers==4.38.1
txtsplit==1.0.0
typer==0.12.5
typing_extensions==4.12.2
tzdata==2024.2
tzlocal==5.2
Unidecode==1.3.7
unidic==1.1.0
unidic-lite==1.0.8
urllib3==2.2.3
uvicorn==0.31.1
wasabi==0.10.1
websockets==12.0
Werkzeug==3.0.4
wrapt==1.16.0
RUN:
python -m unidic download
(https://raw.githubusercontent.com/polm/unidic-py/master/dicts.json)
FOR DEBUG: IN melo/main.py, add:
if __name__ == "__main__":
main()
THEN TO FIX libmecab.so being found, set LD_LIBRARY_PATH
run.sh:
```
export LD_LIBRARY_PATH="/usr/local/lib"
melo "This is some text to read" output.wav
```
had to build mecab because fugashi was failing to install
probably have to also custom install fugashi via custom setup.py + rlink libmecab
https://github.com/polm/fugashi/blob/master/setup.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment