fix: standardize Whisper API path and add ingress rewrite (v9)
Build Curio HMS / build-and-deploy (push) Has been cancelled Details

This commit is contained in:
Deep Koluguri 2026-05-15 00:27:07 -04:00
parent ff4711b071
commit 835b5056bc
1 changed files with 11 additions and 2 deletions

View File

@ -139,16 +139,25 @@ async function startDeepCapture() {
async function processWithWhisper(blob) { async function processWithWhisper(blob) {
const formData = new FormData(); const formData = new FormData();
formData.append("file", blob, "audio.wav"); formData.append("file", blob, "audio.wav");
formData.append("model", "tiny"); // Explicitly tell the server which model to use
try { 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(); const data = await res.json();
if (data.text) { if (data.text) {
document.getElementById("consultationNotes").value += "\n[DEEP SCRIBE]: " + data.text; document.getElementById("consultationNotes").value += "\n[DEEP SCRIBE]: " + data.text;
generateSummary(true); 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) { function generateSummary(isTelugu = false) {
const notes = document.getElementById("consultationNotes").value; const notes = document.getElementById("consultationNotes").value;
if (!notes) return; if (!notes) return;