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,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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue