Files
LocalAI/docs/static/images/diagrams/voice-recognition-flow.html
LocalAI [bot] 7e59a5c7c5 docs: architecture & feature diagrams (blueprint style) (#10137)
* docs: add 'how LocalAI works' architecture diagram

Add a blueprint-style architecture diagram: clients -> small core (API,
router, WebUI, agents) -> gRPC -> backend processes pulled on demand as
OCI images. Place it on the overview page and replace the stale external
architecture image on the reference page.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* docs: add blueprint diagrams across feature, distributed & getting-started docs

Add 24 architecture/flow/comparison diagrams (PNG + HTML source) under
docs/static/images/diagrams/, wired into their docs pages, from an
impact-vs-effort audit of the docs. Broaden the API surface on the
overview architecture diagram (OpenAI, Anthropic, ElevenLabs, Ollama,
and LocalAI's own API) and move the gRPC boundary label clear of the arrows.

Pages: distributed mode (architecture, scheduling, ds4 layer-split),
distributed inferencing, MLX, realtime, quantization, MCP, agents,
mitm & cloud proxy, middleware, reverse-proxy TLS, VRAM, voice & face
recognition, reranker, function calling, fine-tuning (recipe + jobs),
diarization, audio transform, quickstart, model resolution.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* docs: add composable-core diagram to README hero

Commit the composable-core card (small core + on-demand backend tiles)
alongside the other diagrams and reference it from the README hero via a
repo-relative path, so it renders on GitHub.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* docs: fix composable-core connectors/badge and federated-vs-worker layout

- composable-core: thicken the plug-in connectors so they read clearly, and
  widen the SEPARATE IMAGE badge so its text no longer overflows the box.
- federated-vs-worker: shorten the WHOLE/SPLIT REQUEST pills to fit, and
  replace the tangled node-to-node activation arrows with a clean fan-out
  (request split across all sharded nodes), mirroring the federated panel.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
2026-06-02 18:43:22 +02:00

159 lines
8.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Archivo:wght@500;600;700&display=swap" rel="stylesheet">
<style>
:root{
--paper:#F3E8D2; --paper2:#ECDFC2; --ink:#211C14; --ink-soft:#5A5142;
--rust:#B43A2C; --rust-deep:#8F2C20; --cold:#3F6E73; --hi:#E7D6AE; --dim:#A99F88;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{width:1600px;height:900px}
body{
background:var(--paper);color:var(--ink);font-family:"Archivo",sans-serif;
position:relative;overflow:hidden;
background-image:
linear-gradient(var(--paper2) 1px,transparent 1px),
linear-gradient(90deg,var(--paper2) 1px,transparent 1px);
background-size:40px 40px;
}
.frame{position:absolute;inset:26px;border:3px solid var(--ink);}
.wrap{position:absolute;inset:26px;padding:30px 56px 26px;display:flex;flex-direction:column}
header{display:flex;align-items:flex-end;justify-content:space-between;gap:30px}
.eyebrow{font-weight:700;letter-spacing:.22em;text-transform:uppercase;font-size:17px;color:var(--rust-deep)}
.eyebrow b{color:var(--ink)}
h1{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;font-size:50px;line-height:.98;letter-spacing:-.015em;margin-top:6px}
h1 em{font-style:normal;color:var(--rust)}
.stamp{border:3px solid var(--ink);padding:10px 16px 8px;transform:rotate(3deg);text-align:center;background:var(--paper);box-shadow:6px 6px 0 var(--ink);flex:none}
.stamp .k{font-family:"Bricolage Grotesque";font-weight:800;font-size:21px;letter-spacing:.04em;line-height:1.05}
.stamp .s{font-weight:700;font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--ink-soft);margin-top:5px}
.stage{flex:1;margin-top:8px}
svg{width:100%;height:100%;overflow:visible}
footer{display:flex;align-items:center;justify-content:space-between;margin-top:6px;gap:24px}
.note{font-weight:600;font-size:18px;color:var(--ink-soft);line-height:1.3;max-width:1080px}
.note b{color:var(--ink)}
.url{font-family:"Bricolage Grotesque";font-weight:800;font-size:22px;color:var(--rust-deep);letter-spacing:.01em;flex:none}
.url span{color:var(--ink)}
</style>
</head>
<body>
<div class="frame"></div>
<div class="wrap">
<header>
<div>
<div class="eyebrow">LocalAI <b>&middot;</b> Voice Recognition</div>
<h1>Register, identify, <em>forget</em></h1>
</div>
<div class="stamp">
<div class="k">1:N</div>
<div class="s">match</div>
</div>
</header>
<div class="stage"><svg viewBox="0 0 1480 560" id="svg"></svg></div>
<footer>
<div class="note">Voiceprints in a vector store: <b>1:1 verify, or 1:N identify.</b></div>
<div class="url">localai.io<span>/features/voice-recognition</span></div>
</footer>
</div>
<script>
const INK="#211C14", PAPER="#F3E8D2", PAPER2="#ECDFC2", HI="#E7D6AE", SOFT="#5A5142", RUST="#B43A2C", RUSTD="#8F2C20", COLD="#3F6E73", DIM="#A99F88";
function el(t,a,x){const e=document.createElementNS("http://www.w3.org/2000/svg",t);for(const k in a)e.setAttribute(k,a[k]);if(x!=null)e.textContent=x;return e;}
const svg=document.getElementById("svg");
function shadowRect(x,y,w,h,fill,stroke,sw,dash){
svg.appendChild(el("rect",{x:x+7,y:y+7,width:w,height:h,fill:INK}));
svg.appendChild(el("rect",{x,y,width:w,height:h,fill,stroke:stroke||INK,"stroke-width":sw||3.5,"stroke-dasharray":dash||"none"}));
}
function txt(x,y,s,o){o=o||{};svg.appendChild(el("text",{x,y,"font-family":o.f||"Archivo","font-weight":o.w||700,"font-size":o.sz||15,"letter-spacing":o.ls||"0","text-anchor":o.a||"start",fill:o.fill||INK},s));}
function arrow(x1,y1,x2,y2,color,dash){
const mx=(x1+x2)/2;
svg.appendChild(el("path",{d:`M ${x1} ${y1} C ${mx} ${y1}, ${mx} ${y2}, ${x2-11} ${y2}`,fill:"none",stroke:color,"stroke-width":3.5,"stroke-linecap":"round","stroke-dasharray":dash||"none"}));
const a=7;
svg.appendChild(el("path",{d:`M ${x2-11} ${y2} l -${a+4} -${a} M ${x2-11} ${y2} l -${a+4} ${a}`,fill:"none",stroke:color,"stroke-width":3.5,"stroke-linecap":"round"}));
}
// Reusable step box helper
function stepBox(x,y,w,h,fill,title,sub,titleColor){
shadowRect(x,y,w,h,fill);
if(sub){
txt(x+w/2,y+h/2-2,title,{f:"Bricolage Grotesque",w:800,sz:21,a:"middle",fill:titleColor||INK});
txt(x+w/2,y+h/2+20,sub,{w:700,sz:13,a:"middle",fill:SOFT});
} else {
txt(x+w/2,y+h/2+7,title,{f:"Bricolage Grotesque",w:800,sz:21,a:"middle",fill:titleColor||INK});
}
}
// ===================== CENTRAL VECTOR STORE =====================
const VSX=590, VSW=300, VSY=200, VSH=160;
shadowRect(VSX,VSY,VSW,VSH,PAPER,INK,4);
svg.appendChild(el("rect",{x:VSX,y:VSY,width:VSW,height:54,fill:RUST}));
svg.appendChild(el("line",{x1:VSX,y1:VSY+54,x2:VSX+VSW,y2:VSY+54,stroke:INK,"stroke-width":4}));
txt(VSX+VSW/2,VSY+36,"Vector store",{f:"Bricolage Grotesque",w:800,sz:26,a:"middle",fill:PAPER});
// voiceprint rows
const rows=["alice · [0.12, -0.4 …]","bob · [-0.9, 0.3 …]","carol · [0.5, 0.07 …]"];
let ry=VSY+74;
rows.forEach(r=>{
svg.appendChild(el("rect",{x:VSX+18,y:ry,width:VSW-36,height:26,fill:HI,stroke:INK,"stroke-width":2}));
txt(VSX+30,ry+18,r,{f:"Bricolage Grotesque",w:700,sz:14,fill:INK});
ry+=30;
});
txt(VSX+VSW/2,VSY+VSH+24,"voiceprints (embeddings)",{w:700,sz:13,a:"middle",fill:SOFT});
// ===================== REGISTER (top row) =====================
txt(40,46,"REGISTER",{w:700,sz:15,ls:".2em",fill:RUSTD});
const rH=58, rY=64;
stepBox(40,rY,180,rH,PAPER2,"audio","enrollment clip");
stepBox(300,rY,180,rH,HI,"embedding","speaker model",COLD);
arrow(220,rY+rH/2,300,rY+rH/2,INK);
// embedding -> store (into top of vector store, landing left of title)
arrow(480,rY+rH/2,VSX+70,VSY,RUST);
txt(528,rY+rH/2-8,"store",{w:700,sz:14,fill:RUSTD});
// ===================== IDENTIFY (bottom flow, left to right) =====================
txt(40,432,"IDENTIFY",{w:700,sz:15,ls:".2em",fill:RUSTD});
const iH=66, iY=448;
stepBox(40,iY,178,iH,PAPER2,"probe audio","unknown");
stepBox(258,iY,178,iH,HI,"embedding","speaker model",COLD);
stepBox(700,iY,210,iH,PAPER,"top-K cosine","nearest match",RUST);
stepBox(960,iY,178,iH,PAPER2,"speaker","identity + score");
arrow(218,iY+iH/2,258,iY+iH/2,INK);
// embedding up into store
arrow(436+30,iY+iH/2,VSX+90,VSY+VSH,COLD,"2 8");
txt(490,iY+10,"query",{w:700,sz:13,fill:COLD});
// store down to top-K match
arrow(VSX+VSW-50,VSY+VSH,700+10,iY+iH/2,RUST);
txt(640,iY-6,"candidates",{w:700,sz:13,a:"middle",fill:RUSTD});
arrow(910,iY+iH/2,960,iY+iH/2,INK);
// ===================== FORGET (right side) =====================
txt(1238,46,"FORGET",{w:700,sz:15,ls:".2em",a:"start",fill:RUSTD});
const fX=1190, fW=250, fY=64, fH=110;
svg.appendChild(el("rect",{x:fX,y:fY,width:fW,height:fH,fill:PAPER,stroke:DIM,"stroke-width":3.5,"stroke-dasharray":"4 7"}));
txt(fX+fW/2,fY+44,"remove entry",{f:"Bricolage Grotesque",w:800,sz:22,a:"middle",fill:SOFT});
txt(fX+fW/2,fY+72,"delete a voiceprint",{w:700,sz:14,a:"middle",fill:DIM});
txt(fX+fW/2,fY+95,"DELETE /forget",{w:700,sz:13,a:"middle",ls:".06em",fill:RUSTD});
// forget -> store (dashed, removing)
arrow(fX,fY+fH/2,VSX+VSW,VSY+30,DIM,"2 8");
// ===================== LEGEND (corner): verify vs identify =====================
const lgX=1130, lgY=300, lgW=310, lgH=210;
svg.appendChild(el("rect",{x:lgX,y:lgY,width:lgW,height:lgH,fill:PAPER2,stroke:INK,"stroke-width":3}));
txt(lgX+lgW/2,lgY+34,"VERIFY vs IDENTIFY",{f:"Bricolage Grotesque",w:800,sz:18,a:"middle",ls:".04em",fill:INK});
svg.appendChild(el("line",{x1:lgX+16,y1:lgY+48,x2:lgX+lgW-16,y2:lgY+48,stroke:INK,"stroke-width":2}));
// verify (1:1) - cold
svg.appendChild(el("rect",{x:lgX+20,y:lgY+66,width:34,height:34,fill:COLD}));
txt(lgX+37,lgY+89,"1:1",{f:"Bricolage Grotesque",w:800,sz:14,a:"middle",fill:PAPER});
txt(lgX+66,lgY+82,"verify",{f:"Bricolage Grotesque",w:800,sz:18,fill:COLD});
txt(lgX+66,lgY+101,"is this the claimed person?",{w:600,sz:13,fill:SOFT});
// identify (1:N) - rust
svg.appendChild(el("rect",{x:lgX+20,y:lgY+128,width:34,height:34,fill:RUST}));
txt(lgX+37,lgY+151,"1:N",{f:"Bricolage Grotesque",w:800,sz:13,a:"middle",fill:PAPER});
txt(lgX+66,lgY+144,"identify",{f:"Bricolage Grotesque",w:800,sz:18,fill:RUST});
txt(lgX+66,lgY+163,"who is this, out of N?",{w:600,sz:13,fill:SOFT});
txt(lgX+20,lgY+193,"both search the same store.",{w:700,sz:13,fill:INK});
</script>
</body>
</html>