Fix piper: add libespeak-ng1 dep and remove invalid spawnSync encoding
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
8fa906b559
commit
fd88d964f7
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ FROM node:26-slim
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install piper TTS binary and an English voice model
|
# Install piper TTS binary and an English voice model
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates \
|
RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates libespeak-ng1 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN wget -qO /tmp/piper.tar.gz \
|
RUN wget -qO /tmp/piper.tar.gz \
|
||||||
|
|||||||
@@ -1306,7 +1306,7 @@ app.get('/api/tts', (req, res) => {
|
|||||||
'--model', PIPER_MODEL,
|
'--model', PIPER_MODEL,
|
||||||
'--output_file', cachePath,
|
'--output_file', cachePath,
|
||||||
'--quiet',
|
'--quiet',
|
||||||
], { input: text, encoding: 'buffer', timeout: 15000 });
|
], { input: text, timeout: 15000 });
|
||||||
|
|
||||||
if (result.status !== 0 || !existsSync(cachePath)) {
|
if (result.status !== 0 || !existsSync(cachePath)) {
|
||||||
return res.status(500).json({ error: 'TTS generation failed' });
|
return res.status(500).json({ error: 'TTS generation failed' });
|
||||||
|
|||||||
Reference in new issue
Block a user