Fix Novel TTS audio on iOS

This commit is contained in:
Cohee
2023-06-13 01:21:35 +03:00
parent 47fa79fcbc
commit 0013fb6a97

View File

@@ -3568,7 +3568,7 @@ app.post('/novel_tts', jsonParser, async (request, response) => {
method: 'GET', method: 'GET',
headers: { headers: {
'Authorization': `Bearer ${token}`, 'Authorization': `Bearer ${token}`,
'Accept': 'audio/webm', 'Accept': 'audio/mpeg',
}, },
timeout: 0, timeout: 0,
}); });
@@ -3579,7 +3579,7 @@ app.post('/novel_tts', jsonParser, async (request, response) => {
const chunks = await readAllChunks(result.body); const chunks = await readAllChunks(result.body);
const buffer = Buffer.concat(chunks); const buffer = Buffer.concat(chunks);
response.setHeader('Content-Type', 'audio/webm'); response.setHeader('Content-Type', 'audio/mpeg');
return response.send(buffer); return response.send(buffer);
} }
catch (error) { catch (error) {