// Gracefully terminate the Chatterbox TTS server. // Usage: node terminate.mjs const PORT = process.env.TTS_PORT ?? '11500' const res = await fetch(`http://localhost:${PORT}/command`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ command: 'terminate' }), }) const data = await res.json() if (data.status !== 'ok') { console.error('error:', data.message) process.exit(1) }