mlx-audio icon indicating copy to clipboard operation
mlx-audio copied to clipboard

Server shuts down randomly when sending texts.

Open jjboi8708 opened this issue 11 months ago • 2 comments

The server keeps on shutting down and says this:

(tts) .venvjc@Mac mlx-audio % mlx_audio.server --verbose
Fetching 2 files: 100%|█████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 6078.70it/s]
INFO:     Started server process [59790]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Fetching 2 files: 100%|████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 24456.58it/s]
mx.metal.get_peak_memory is deprecated and will be removed in a future version. Use mx.get_peak_memory instead.
INFO:     127.0.0.1:56830 - "POST /tts HTTP/1.1" 200 OK
INFO:     127.0.0.1:56830 - "GET /audio/tts_afde4462-ea8d-4866-a58b-0357f7df256a.wav HTTP/1.1" 200 OK
Fetching 2 files: 100%|█████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 1415.32it/s]
INFO:     127.0.0.1:56830 - "POST /tts HTTP/1.1" 200 OK
INFO:     127.0.0.1:56830 - "GET /audio/tts_614cc118-7861-40b9-908b-7f4520dcc82b.wav HTTP/1.1" 200 OK
Fetching 2 files: 100%|█████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 3062.65it/s]
INFO:     127.0.0.1:56833 - "POST /tts HTTP/1.1" 200 OK
INFO:     127.0.0.1:56833 - "GET /audio/tts_a3491fab-5b00-40aa-9ff0-1e341bda3ff6.wav HTTP/1.1" 200 OK
Fetching 2 files: 100%|█████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 3114.97it/s]
INFO:     127.0.0.1:56833 - "POST /tts HTTP/1.1" 200 OK
INFO:     127.0.0.1:56833 - "GET /audio/tts_304420c8-145f-455e-90fc-185e640fd3ec.wav HTTP/1.1" 200 OK
Fetching 2 files: 100%|████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16644.06it/s]
INFO:     127.0.0.1:56835 - "POST /tts HTTP/1.1" 200 OK
INFO:     127.0.0.1:56835 - "GET /audio/tts_2bfaeac7-1dd5-433f-a702-1183d5d13d98.wav HTTP/1.1" 200 OK
Fetching 2 files: 100%|█████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 9619.96it/s]
INFO:     127.0.0.1:56835 - "POST /tts HTTP/1.1" 200 OK
INFO:     127.0.0.1:56835 - "GET /audio/tts_aeef890f-12fd-45b6-911e-5d46d3eac0e1.wav HTTP/1.1" 200 OK
Fetching 2 files: 100%|█████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2427.26it/s]
INFO:     127.0.0.1:56839 - "POST /tts HTTP/1.1" 200 OK
INFO:     127.0.0.1:56839 - "GET /audio/tts_d67e7375-914f-4166-9896-f2d8ccb43c14.wav HTTP/1.1" 200 OK
Fetching 2 files: 100%|████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 12748.64it/s]
2025-04-02 09:49:23,264 - phonemizer - WARNING - words count mismatch on 200.0% of the lines (2/1)
Fetching 2 files: 100%|█████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 8338.58it/s]
zsh: segmentation fault  mlx_audio.server --verbose
(tts) .venvjc@Mac mlx-audio % /Users/jc/miniforge3/envs/tts/lib/python3.12/multiprocessing/resource_tracker.py:255: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

Any way that this could be fixed? Or am I using the server wrong?

jjboi8708 avatar Apr 02 '25 19:04 jjboi8708

Hi @jjboi8708

Yes, this will be fixed,

From what I can telln you ran out of memory.

Could you share your machine specs and the text you were processing so I can replicate it? It can be a different text of similar size.

Blaizzy avatar Apr 03 '25 22:04 Blaizzy

Got the same issue. There is 128G memory on my Mac M4.

davideuler avatar Jun 15 '25 10:06 davideuler