mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix Novel TTS audio on iOS
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user