Add piper error detail to TTS response for debugging

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Nate EmmertandClaude Sonnet 4.6 committed 2026-07-21 10:35:03 -04:00
1 parent fd88d964f7
commit 984834e896
1 file changed
+2 -1
+2 -1
View File
@@ -1309,7 +1309,8 @@ app.get('/api/tts', (req, res) => {
], { input: text, timeout: 15000 });
if (result.status !== 0 || !existsSync(cachePath)) {
return res.status(500).json({ error: 'TTS generation failed' });
console.error('piper failed:', result.status, result.stderr?.toString(), result.error);
return res.status(500).json({ error: 'TTS generation failed', detail: result.stderr?.toString() });
}
}