fix: standardize Whisper API path and add ingress rewrite (v9)
Build Curio HMS / build-and-deploy (push) Has been cancelled
Details
Build Curio HMS / build-and-deploy (push) Has been cancelled
Details
This commit is contained in:
parent
ff4711b071
commit
835b5056bc
13
dashboard.js
13
dashboard.js
|
|
@ -139,15 +139,24 @@ async function startDeepCapture() {
|
|||
async function processWithWhisper(blob) {
|
||||
const formData = new FormData();
|
||||
formData.append("file", blob, "audio.wav");
|
||||
formData.append("model", "tiny"); // Explicitly tell the server which model to use
|
||||
|
||||
try {
|
||||
const res = await fetch("https://curio.applaude.net/api/whisper/v1/transcribe", { method: "POST", body: formData });
|
||||
const res = await fetch("https://curio.applaude.net/api/whisper/v1/audio/transcriptions", {
|
||||
method: "POST",
|
||||
body: formData
|
||||
});
|
||||
const data = await res.json();
|
||||
if (data.text) {
|
||||
document.getElementById("consultationNotes").value += "\n[DEEP SCRIBE]: " + data.text;
|
||||
generateSummary(true);
|
||||
}
|
||||
} catch (e) { generateSummary(document.getElementById("scribeLang")?.value === 'te-IN'); }
|
||||
} catch (e) {
|
||||
console.warn("Deep Scribe error, using fallback summary.", e);
|
||||
generateSummary(document.getElementById("scribeLang")?.value === 'te-IN');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function generateSummary(isTelugu = false) {
|
||||
const notes = document.getElementById("consultationNotes").value;
|
||||
|
|
|
|||
Loading…
Reference in New Issue