This repository was archived by the owner on May 11, 2026. It is now read-only.
forked from myshell-ai/MeloTTS
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
151 lines (129 loc) · 6.1 KB
/
Copy pathTaskfile.yml
File metadata and controls
151 lines (129 loc) · 6.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
version: '3'
vars:
IMAGE: melotts:test
PORT: '8888'
BUILD_ID: ''
GPU_DEVICE: '0'
CONTAINER_EN: melotts_en
CONTAINER_FULL: melotts_full
CONTAINER_LOCAL: melotts_local
LANG_EN: EN
LANG_FULL: EN,EN_V2,EN_NEWEST,ES,FR,ZH,JP,KR
TEMP_WAV: '%TEMP%\\melotts_task.wav'
WAIT_URL: http://localhost:{{.PORT}}/tts/ping
RELEASE_VERSION: ''
NEXT_VERSION: ''
RELEASE_REMOTE: origin
RELEASE_BRANCH: main
tasks:
gpuinfo:
desc: Show host GPU indexes (use with GPU_DEVICE variable)
cmds:
- cmd /c nvidia-smi --query-gpu=index,name --format=csv,noheader
image:
desc: Build local MeloTTS Docker image (FULL profile)
cmds:
- cmd /c docker build --build-arg BUILD_ID={{.BUILD_ID}} --build-arg INIT_DOWNLOADS_PROFILE=FULL -t {{.IMAGE}} .
imagesmall:
desc: Build local MeloTTS Docker image with EN-only preload profile
cmds:
- cmd /c docker build --build-arg BUILD_ID={{.BUILD_ID}} --build-arg INIT_DOWNLOADS_PROFILE=EN_ONLY -t {{.IMAGE}} .
imagerun:
desc: Run existing image with full language set (default GPU_DEVICE=0)
cmds:
- cmd: cmd /c docker rm -f {{.CONTAINER_FULL}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker rm -f {{.CONTAINER_EN}} >nul 2>&1
ignore_error: true
- cmd /c docker run -d --name {{.CONTAINER_FULL}} -p {{.PORT}}:8888 --gpus all -e CUDA_VISIBLE_DEVICES={{.GPU_DEVICE}} -e TTS_LANGUAGES={{.LANG_FULL}} {{.IMAGE}}
- cmd /c docker ps --filter "name={{.CONTAINER_FULL}}"
imageweb:
desc: Open default browser to the local MeloTTS UI
cmds:
- cmd /c start "" "http://localhost:{{.PORT}}"
imagewait:
desc: Wait until the MeloTTS API is ready
cmds:
- 'cmd /c curl.exe -sS --retry 30 --retry-delay 2 --retry-connrefused --retry-all-errors {{.WAIT_URL}} >nul'
imagestop:
desc: Stop running MeloTTS test containers
cmds:
- cmd: cmd /c docker stop {{.CONTAINER_EN}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker stop {{.CONTAINER_FULL}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker stop {{.CONTAINER_LOCAL}} >nul 2>&1
ignore_error: true
imagerunsmall:
desc: Run existing image with English only (default GPU_DEVICE=0)
cmds:
- cmd: cmd /c docker rm -f {{.CONTAINER_EN}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker rm -f {{.CONTAINER_FULL}} >nul 2>&1
ignore_error: true
- cmd /c docker run -d --name {{.CONTAINER_EN}} -p {{.PORT}}:8888 --gpus all -e CUDA_VISIBLE_DEVICES={{.GPU_DEVICE}} -e TTS_LANGUAGES={{.LANG_EN}} {{.IMAGE}}
- cmd /c docker ps --filter "name={{.CONTAINER_EN}}"
localrun:
desc: Run image with local melo/app.py bind-mounted for quick UI/API testing (default GPU_DEVICE=0)
cmds:
- cmd: cmd /c docker rm -f {{.CONTAINER_EN}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker rm -f {{.CONTAINER_FULL}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker rm -f {{.CONTAINER_LOCAL}} >nul 2>&1
ignore_error: true
- cmd /c docker run -d --name {{.CONTAINER_LOCAL}} -p {{.PORT}}:8888 --gpus all -e CUDA_VISIBLE_DEVICES={{.GPU_DEVICE}} -e TTS_LANGUAGES={{.LANG_EN}} -v "{{.TASKFILE_DIR}}\melo\app.py:/app/melo/app.py:ro" -v "{{.TASKFILE_DIR}}\icon.png:/app/icon.png:ro" {{.IMAGE}}
- cmd /c docker ps --filter "name={{.CONTAINER_LOCAL}}"
localdev:
desc: Restart local app.py bind mount, wait for readiness, then open the UI
cmds:
- task: localrun
- task: imagewait
- task: imageweb
localapi:
desc: Restart local app.py bind mount, wait for readiness, then call the TTS API
cmds:
- task: localrun
- task: imageapi
locallogs:
desc: Follow logs for the local app.py bind-mounted container
cmds:
- cmd /c docker logs -f {{.CONTAINER_LOCAL}}
localrunfull:
desc: Run image with local melo/app.py bind-mounted and full language set (default GPU_DEVICE=0)
cmds:
- cmd: cmd /c docker rm -f {{.CONTAINER_EN}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker rm -f {{.CONTAINER_FULL}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker rm -f {{.CONTAINER_LOCAL}} >nul 2>&1
ignore_error: true
- cmd /c docker run -d --name {{.CONTAINER_LOCAL}} -p {{.PORT}}:8888 --gpus all -e CUDA_VISIBLE_DEVICES={{.GPU_DEVICE}} -e TTS_LANGUAGES={{.LANG_FULL}} -v "{{.TASKFILE_DIR}}\melo\app.py:/app/melo/app.py:ro" -v "{{.TASKFILE_DIR}}\icon.png:/app/icon.png:ro" {{.IMAGE}}
- cmd /c docker ps --filter "name={{.CONTAINER_LOCAL}}"
imageapi:
desc: Call TTS API, play generated temp WAV, then remove it
cmds:
- task: imagewait
- 'cmd /c curl.exe -sS -X POST http://localhost:{{.PORT}}/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 {{.TEMP_WAV}}'
- 'cmd /c if not exist {{.TEMP_WAV}} exit /b 1'
- 'cmd /c python -c "import winsound; winsound.PlaySound(r''{{.TEMP_WAV}}'', winsound.SND_FILENAME)"'
- 'cmd /c del /f /q {{.TEMP_WAV}}'
release:
desc: Release current VERSION snapshot, tag it, then bump to next snapshot
cmds:
- powershell -NoProfile -ExecutionPolicy Bypass -File "{{.TASKFILE_DIR}}\scripts\release.ps1" -Version "{{.RELEASE_VERSION}}" -NextVersion "{{.NEXT_VERSION}}"
releasepush:
desc: Push release tag first, then branch, so GitHub tag workflows build the release
cmds:
- powershell -NoProfile -ExecutionPolicy Bypass -File "{{.TASKFILE_DIR}}\scripts\release-push.ps1" -Version "{{.RELEASE_VERSION}}" -Remote "{{.RELEASE_REMOTE}}" -Branch "{{.RELEASE_BRANCH}}"
nuke:
desc: Remove local MeloTTS containers and image
cmds:
- cmd: cmd /c docker rm -f {{.CONTAINER_EN}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker rm -f {{.CONTAINER_FULL}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker rm -f {{.CONTAINER_LOCAL}} >nul 2>&1
ignore_error: true
- cmd: cmd /c docker rmi -f {{.IMAGE}} >nul 2>&1
ignore_error: true