Fix fetch buffer deprecation warnings

This commit is contained in:
Cohee
2025-01-01 22:18:23 +02:00
parent e99f918454
commit 5db7a9cf1e
2 changed files with 8 additions and 8 deletions

View File

@@ -79,7 +79,7 @@ router.post('/generate', jsonParser, async (req, res) => {
return res.sendStatus(500);
}
const audio = await response.buffer();
const audio = Buffer.from(await response.arrayBuffer());
res.set('Content-Type', 'audio/ogg');
return res.send(audio);
} catch (error) {