This project has moved to Hangry Labs:
https://github.com/hangry-labs/MeloTTS
Use the Hangry Labs repository for current issues, discussions, pull requests, releases, and documentation updates. Older fork locations should be treated as public redirects or archives only.
##Tools
winget install --id=astral-sh.uv -e
git tag v0.0.2
git push origin v0.0.2
docker run -p 8888:8888 sensejworld/melotts
docker run --gpus all -p 8888:8888 sensejworld/melotts
You need docker to be working. (Example : Docker Desktop)
docker build -t melotts:test .
docker run -p 8888:8888 --gpus all melotts:test
docker run -p 8888:8888 -it --rm --gpus all --add-host=cdn-lfs.huggingface.co:127.0.0.1 --add-host=hf.co:127.0.0.1 --add-host=huggingface.co:127.0.0.1 --add-host=s3.amazonaws.com:127.0.0.1 --add-host=raw.githubusercontent.com:127.0.0.1 --add-host=git-lfs.github.com:127.0.0.1 --add-host=objects.githubusercontent.com:127.0.0.1 melotts:test
docker run -p 8888:8888 --gpus all -e TTS_LANGUAGES=EN melotts:test
docker run -it --rm --entrypoint bash sensejworld/melotts:latest
After building an image once, use the bind-mounted tasks for melo/app.py edits:
task localdev
task localapiThese mount melo/app.py into the container so most UI/API changes do not require a Docker rebuild.
curl -v http://localhost:8888/tts/pingcurl -v -X POST http://localhost:8888/tts/convert/tts ^
-H "Content-Type: application/json" ^
-d "{\"text\":\"Hello world. I wanted to test this and see if this works properly\",\"speed\":1.0,\"language\":\"EN\",\"speaker_id\":\"EN-BR\",\"sdp_ratio\":\"0.21\",\"noise_scale\":\"0.61\",\"noise_scale_w\":\"0.81\"}" ^
--output hello.wavcurl -v -X POST http://localhost:8888/tts/convert/tts ^
-H "Content-Type: application/json" ^
-d "{\"text\":\"Hello world. I wanted to test MP3 output\",\"language\":\"EN\",\"speaker_id\":\"EN-BR\",\"format\":\"mp3\"}" ^
--output hello.mp3Available response formats:
curl -v http://localhost:8888/tts/formatsThe UI has an Output Format dropdown and defaults to MP3. The API remains WAV-by-default when format is omitted.
curl -v http://localhost:8888/tts/languagescurl -v "http://localhost:8888/tts/speakers?language=EN"docker system prune -a --volumes
- Port 8888 is exposed for web interface
- Use
--gpus allonly if NVIDIA drivers and Docker GPU support is installed
Python dependency files in this repo:
requirements.inis the short human-edited list. It says what this project directly needs.requirements.txtis the full resolved/pinned list. Docker installs this file so builds are repeatable.uvis the resolver. It readsrequirements.in, figures out all transitive dependencies, and writesrequirements.txt.
Go comparison:
requirements.inis a little like the dependencies you intentionally care about.requirements.txtis closer to a lock file: exact versions that are known to work.uv pip compileis the command that refreshes the lock-like file.
Install uv on Windows:
winget install --id=astral-sh.uv -eRefresh Python dependencies:
uv pip compile requirements.in --upgrade --python-version 3.10 --no-header --no-annotate --output-file requirements.txtAfter this command, inspect requirements.txt. It may change many indirect packages even if requirements.in is small.
Add a new direct dependency:
- Add the package name to
requirements.in. - Run the resolver command above.
- Build and test Docker.
Remove a dependency:
- Remove it from
requirements.in. - Run the resolver command above.
- Check whether it disappeared from
requirements.txt. - Build and test Docker.
Docker remains the expected validation environment for dependency upgrades:
task imagesmall
task localapiCheck dependency consistency inside the running container:
docker exec melotts_local python -m pip checkPrint key runtime versions:
docker exec melotts_local python -c "import gradio, fastapi, starlette, pydantic, torch, torchaudio, transformers, numpy, soundfile; print('gradio', gradio.__version__); print('fastapi', fastapi.__version__); print('starlette', starlette.__version__); print('pydantic', pydantic.__version__); print('torch', torch.__version__); print('torchaudio', torchaudio.__version__); print('transformers', transformers.__version__); print('numpy', numpy.__version__); print('soundfile', soundfile.__version__)"Root VERSION is the release source of truth. A standard patch release can be prepared from a clean working tree with:
task release
The task requires VERSION to be a snapshot such as v0.0.9-SNAPSHOT. It commits VERSION=v0.0.9, creates tag v0.0.9, then commits the next patch snapshot such as v0.0.10-SNAPSHOT. Override the release or next version only when needed:
task release RELEASE_VERSION=v0.0.9 NEXT_VERSION=v0.1.0-SNAPSHOT
The release task allows untracked local todo/ files so private notes can stay visible locally. It fails if anything in todo/ is staged or tracked, because todo/ is not meant to be released.
Publish the prepared release with:
task releasepush RELEASE_VERSION=v0.0.9
This pushes the release tag first so GitHub Actions runs the tag build, then pushes main with the next -SNAPSHOT version.