diff --git a/app/pages/PageEnigma/comps/DialogueTTS/generateTts.tsx b/app/pages/PageEnigma/comps/DialogueTTS/generateTts.tsx index eaeb358993..c2ed530190 100644 --- a/app/pages/PageEnigma/comps/DialogueTTS/generateTts.tsx +++ b/app/pages/PageEnigma/comps/DialogueTTS/generateTts.tsx @@ -24,7 +24,7 @@ export async function GenerateTtsAudio(request: GenerateTtsAudioRequest) : Promi 'Accept': 'application/json', 'Content-Type': 'application/json', }, - credentials: 'include', + // credentials: 'include', body: JSON.stringify(request), }) .then(res => res.json()) @@ -47,39 +47,4 @@ export async function GenerateTtsAudio(request: GenerateTtsAudioRequest) : Promi return { error: GenerateTtsAudioErrorType.UnknownError }; }); - // return await fetch(inferTts, { - // method: 'POST', - // headers: { - // 'Accept': 'application/json', - // 'Content-Type': 'application/json', - // }, - // credentials: 'include', - // body: JSON.stringify(request), - // }) - // .then(res => res.json().then(data => ({ status: res.status, body: data }))) - // .then((fullResponse) => { - // let maybeError = maybeMapError(fullResponse); - // if (maybeError !== undefined) { - // return { error: maybeError }; - // } - // if (!fullResponse.body || !fullResponse.body.success) { - // return { error: GenerateTtsAudioErrorType.UnknownError }; - // } - - // if (!('inference_job_token' in fullResponse.body)) { - // return { error: GenerateTtsAudioErrorType.UnknownError }; - // } else { - // return { - // inference_job_token: fullResponse.body.inference_job_token, - // inference_job_token_type: fullResponse.body.inference_job_token_type, - // }; - // } - // }) - // .catch(e => { - // let maybeError = maybeMapError(e); - // if (maybeError !== undefined) { - // return { error: maybeError }; - // } - // return { error: GenerateTtsAudioErrorType.UnknownError }; - // }); };