Skip to content

Commit a2f782f

Browse files
authored
Update Chatterbox_TTS_Colab_Demo.ipynb
1 parent a658031 commit a2f782f

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

Chatterbox_TTS_Colab_Demo.ipynb

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"nbformat_minor": 0,
44
"metadata": {
55
"colab": {
6-
"gpuType": "T4"
6+
"gpuType": "T4",
7+
"provenance": []
78
},
89
"kernelspec": {
910
"name": "python3",
@@ -153,16 +154,16 @@
153154
"\n",
154155
"print(\"\\n=== Installing server requirements (prefer repo pins if present) ===\")\n",
155156
"if Path(\"requirements-nvidia.txt\").exists():\n",
156-
" sh(\"/content/bin/micromamba run -n cb311 pip install -U pip setuptools wheel\", check=True)\n",
157-
" sh(\"/content/bin/micromamba run -n cb311 pip install -r requirements-nvidia.txt\", check=True)\n",
157+
" sh(\"/content/bin/micromamba run -n cb311 pip install -U pip setuptools wheel\", check=False)\n",
158+
" sh(\"/content/bin/micromamba run -n cb311 pip install -r requirements-nvidia.txt\", check=False)\n",
158159
"else:\n",
159160
" sh(\n",
160161
" \"/content/bin/micromamba run -n cb311 pip install -U pip setuptools wheel && \"\n",
161162
" \"/content/bin/micromamba run -n cb311 pip install \"\n",
162163
" \"fastapi 'uvicorn[standard]' pyyaml soundfile librosa safetensors \"\n",
163164
" \"python-multipart requests jinja2 watchdog aiofiles unidecode inflect tqdm \"\n",
164165
" \"pydub audiotsm praat-parselmouth\",\n",
165-
" check=True\n",
166+
" check=False\n",
166167
" )\n",
167168
"\n",
168169
"print(\"\\n=== Removing old stdout log ===\")\n",
@@ -191,22 +192,13 @@
191192
")\n",
192193
"\n",
193194
"with open(LOG_STDOUT, \"w\", encoding=\"utf-8\", errors=\"replace\") as f:\n",
194-
" import select\n",
195195
" shown_link = False\n",
196196
" while True:\n",
197-
" # Wait briefly for stdout, but still poll port status regularly\n",
198-
" ready, _, _ = select.select([proc.stdout], [], [], 0.2)\n",
199-
" if ready:\n",
200-
" line = proc.stdout.readline()\n",
201-
" if line:\n",
202-
" print(line, end=\"\")\n",
203-
" f.write(line)\n",
204-
" f.flush()\n",
205-
" else:\n",
206-
" # EOF on pipe\n",
207-
" if proc.poll() is not None:\n",
208-
" print(\"\\n=== Server process exited with code\", proc.returncode, \"===\")\n",
209-
" break\n",
197+
" line = proc.stdout.readline()\n",
198+
" if line:\n",
199+
" print(line, end=\"\")\n",
200+
" f.write(line)\n",
201+
" f.flush()\n",
210202
"\n",
211203
" if (not shown_link) and port_open():\n",
212204
" shown_link = True\n",
@@ -215,6 +207,7 @@
215207
" from google.colab.output import serve_kernel_port_as_window\n",
216208
" serve_kernel_port_as_window(PORT)\n",
217209
"\n",
210+
" # Verify model load status via server endpoint\n",
218211
" try:\n",
219212
" mi = requests.get(f\"http://127.0.0.1:{PORT}/api/model-info\", timeout=2).json()\n",
220213
" print(\"\\n/api/model-info:\", mi)\n",
@@ -223,7 +216,7 @@
223216
"\n",
224217
" if proc.poll() is not None:\n",
225218
" print(\"\\n=== Server process exited with code\", proc.returncode, \"===\")\n",
226-
" break\n"
219+
" break"
227220
],
228221
"metadata": {
229222
"id": "n8DXZwq1uQEB"

0 commit comments

Comments
 (0)