Files
ai-agent-book/book-he/images/fig6-6.svg
T
liqiang b119135836
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
2026-08-20 13:12:50 +00:00

41 lines
7.6 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 780 300" width="780" height="300" style="background:#ffffff">
<defs><marker id="ah" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#333333"/></marker><marker id="ah-light" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#999999"/></marker></defs>
<rect x="47" y="60" width="155" height="140" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="124" y="82" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">VAD</text>
<text x="124" y="104" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.5" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Voice Activity Detection</text>
<rect x="62" y="122" width="125" height="28" rx="3" fill="#f5f5f5" stroke="#333333" stroke-width="2"/>
<text x="124" y="136" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">500-800ms</text>
<text x="124" y="162" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Silero VAD</text>
<text x="124" y="180" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">ONNX Runtime</text>
<rect x="224" y="60" width="155" height="140" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="301" y="82" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">ASR</text>
<text x="301" y="104" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10.5" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Automatic Speech Recognition</text>
<rect x="239" y="122" width="125" height="28" rx="3" fill="#f5f5f5" stroke="#333333" stroke-width="2"/>
<text x="301" y="136" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">50-200ms</text>
<text x="301" y="162" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Whisper</text>
<text x="301" y="180" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">SenseVoice</text>
<line x1="204" y1="130" x2="222" y2="130" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="401" y="60" width="155" height="140" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="478" y="82" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">LLM</text>
<text x="478" y="104" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Language Model Inference</text>
<rect x="416" y="122" width="125" height="28" rx="3" fill="#f5f5f5" stroke="#333333" stroke-width="2"/>
<text x="478" y="136" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">100-500ms</text>
<text x="478" y="162" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">GPT-4o</text>
<text x="478" y="180" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Doubao Flash</text>
<line x1="381" y1="130" x2="399" y2="130" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="578" y="60" width="155" height="140" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="655" y="82" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">TTS</text>
<text x="655" y="104" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Speech Synthesis</text>
<rect x="593" y="122" width="125" height="28" rx="3" fill="#f5f5f5" stroke="#333333" stroke-width="2"/>
<text x="655" y="136" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">200-500ms</text>
<text x="655" y="162" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Fish Audio S1</text>
<text x="655" y="180" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12.5" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Neural Network Synthesis</text>
<line x1="558" y1="130" x2="576" y2="130" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<g fill="#333333"><rect x="12" y="112" width="10" height="18" rx="5"/><path d="M9,127 a8,8 0 0 0 16,0" fill="none" stroke="#333333" stroke-width="2"/><rect x="16" y="135" width="2" height="7"/><rect x="11" y="142" width="12" height="2"/></g>
<g fill="#333333"><path d="M740,124 h6 l8,-7 v26 l-8,-7 h-6 z"/><path d="M757,120 a10,10 0 0 1 0,20" fill="none" stroke="#333333" stroke-width="2"/><path d="M757,125 a5,5 0 0 1 0,10" fill="none" stroke="#333333" stroke-width="2"/></g>
<rect x="40" y="225" width="700" height="75" rx="4" fill="#f5f5f5" stroke="#333333" stroke-width="2"/>
<text x="390" y="245" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Serial blocking: each stage waits for the previous stage to complete</text>
<text x="390" y="267" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">User speaks 2-3 seconds → VAD waits → ASR waits → LLM idle → wastes all time gaps</text>
<text x="390" y="287" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Tech stack: Node.js WebSocket + AudioWorklet (128 samples ≈ 2.7ms) + FFmpeg</text>
</svg>