diff --git a/apps/api/src/stt.ts b/apps/api/src/stt.ts index fa20819..5a38365 100644 --- a/apps/api/src/stt.ts +++ b/apps/api/src/stt.ts @@ -12,7 +12,13 @@ router.post('/', async (req, res) => { return res.status(400).json({ error: 'bucket (or env S3_BUCKET) and key are required' }); } if (!process.env.OPENAI_API_KEY) { - return res.status(500).json({ error: 'OPENAI_API_KEY not configured' }); + console.error('STT failed: missing OPENAI_API_KEY'); + return res.status(500).json({ error: 'Transcription not configured' }); + } + const { S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY } = process.env; + if (!S3_ENDPOINT || !S3_ACCESS_KEY || !S3_SECRET_KEY) { + console.error('STT failed: missing S3 config (S3_ENDPOINT/S3_ACCESS_KEY/S3_SECRET_KEY)'); + return res.status(500).json({ error: 'Object storage not configured' }); } const { buffer, contentType } = await downloadObject({ bucket, key }); diff --git a/tmp/sample.webm b/tmp/sample.webm new file mode 100644 index 0000000..cb43b5c Binary files /dev/null and b/tmp/sample.webm differ