// Play a chime WAV file via the Chatterbox TTS server. // Usage: node chime.mjs /path/to/chime.wav const PORT = process.env.TTS_PORT ?? '11500' const path = process.argv[2] if (!path) { console.error('usage: node chime.mjs /path/to/chime.wav') process.exit(1) } const res = await fetch(`http://localhost:${PORT}/chime`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ path }), }) const data = await res.json() if (data.status !== 'ok') { console.error('error:', data.message) process.exit(1) }