[fix] novelai fixes by hashcoko
This commit is contained in:
@@ -152,7 +152,13 @@ export async function sayTTS(character:character,text:string) {
|
|||||||
if(text === ''){
|
if(text === ''){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const response = await globalFetch(`https://api.novelai.net/ai/generate-voice?text=${text}&voice=-1&seed=${character.naittsConfig.voice}&opus=false&version=${character.naittsConfig.version}`, {
|
const encodedText = encodeURIComponent(text);
|
||||||
|
const encodedSeed = encodeURIComponent(character.naittsConfig.voice);
|
||||||
|
|
||||||
|
// 인코딩된 값을 사용하여 URL 생성
|
||||||
|
const url = `https://api.novelai.net/ai/generate-voice?text=${encodedText}&voice=-1&seed=${encodedSeed}&opus=false&version=${character.naittsConfig.version}`;
|
||||||
|
|
||||||
|
const response = await globalFetch(url, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": "Bearer " + db.NAIApiKey,
|
"Authorization": "Bearer " + db.NAIApiKey,
|
||||||
|
|||||||
Reference in New Issue
Block a user