Files
teams-whisper/install.js
T
pinokioandClaude Opus 5.5 a64d3fb275 Hardware-aware install, per-step LLM profiles, tuned llama.cpp for 4 GB VRAM
Benchmarked on RTX 500 Ada 4 GB (~3.2 GB usable on Windows) + Core Ultra 7 155H.

- install.js: log GPU/VRAM/RAM, abort without NVIDIA >= 4 GB VRAM; always
  install Qwen3.5-4B Q4_K_S, Qwen3.6-35B-A3B only with >= 48 GB RAM.
- llama.py: model registry with vision (shots) and text (report/ask)
  profiles; KV q8, image tokens 1024-1536.
  - 35B: vision encoder on GPU, -ngl 30 (shot 142 -> ~50 s); text: -ub 2048.
  - 4B: vision encoder on GPU, FFN of layers 19-31 in RAM (shot 36 -> 22 s);
    text fully on GPU (~30 tok/s, report 4.5 min).
  - Per-step choice in out/llm.txt: default 4B for shots, biggest for report.
- flow.py: restart llama in text profile after shots (no mmproj for report).
- shots.py: prompt v3 (inline template + defined fields, Italian summary
  rules) and bounded json_schema; stops 4B loops, title 1/38 -> 36/38.
- server.py: shots/report model selects, POST /cancel + stop button, reaper
  thread that honours Prefect "Cancel" and closes runs whose process died.
- diarize.py: cut same-speaker paragraphs every 60 s (one 11-min paragraph
  truncated every report at 28:52); 8 threads; CUDA provider with CPU
  fallback via sherpa-onnx cuda12.cudnn9 wheel (CUDA path not yet verified).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 15:20:19 +01:00

130 lines
3.6 KiB
JavaScript

module.exports = {
requires: {
bundle: "ai"
},
run: [
{
method: "log",
params: {
raw: "Hardware: {{gpu_model}} · {{vram}} GB VRAM · {{ram}} GB RAM"
}
},
// floor: NVIDIA with 4 GB VRAM (llama.cpp CUDA build + whisper on GPU)
{
when: "{{gpu !== 'nvidia' || vram < 4}}",
method: "notify",
params: {
html: "Teams Whisper needs an NVIDIA GPU with at least 4 GB VRAM (found: {{gpu_model}}, {{vram}} GB)."
},
next: null
},
{
method: "shell.run",
params: {
message: "conda install -y -c conda-forge ffmpeg 7zip"
}
},
// llama.cpp server (CUDA 13) for the Qwen VLM + bge-m3 embeddings
{
method: "fs.download",
params: {
uri: [
"https://github.com/ggml-org/llama.cpp/releases/download/b11889/llama-b11889-bin-win-cuda-13.4-x64.zip",
"https://github.com/ggml-org/llama.cpp/releases/download/b11889/cudart-llama-bin-win-cuda-13.4-x64.zip"
],
dir: "app/bin"
}
},
{
method: "shell.run",
params: {
path: "app/bin",
message: [
"7z x -y llama-b11889-bin-win-cuda-13.4-x64.zip",
"7z x -y cudart-llama-bin-win-cuda-13.4-x64.zip"
]
}
},
{
method: "fs.rm",
params: {
path: "app/bin/llama-b11889-bin-win-cuda-13.4-x64.zip"
}
},
{
method: "fs.rm",
params: {
path: "app/bin/cudart-llama-bin-win-cuda-13.4-x64.zip"
}
},
// speaker diarization (sherpa-onnx)
{
method: "fs.download",
params: {
uri: "https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_eres2net_base_sv_zh-cn_3dspeaker_16k.onnx",
path: "app/models/emb.onnx"
}
},
{
method: "fs.download",
params: {
uri: "https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-segmentation-models/sherpa-onnx-pyannote-segmentation-3-0.tar.bz2",
path: "app/models/seg.tar.bz2"
}
},
{
method: "shell.run",
params: {
path: "app/models",
message: "tar -xjf seg.tar.bz2"
}
},
// embeddings for cross-meeting memory
{
method: "hf.download",
params: {
path: "app",
_: ["gpustack/bge-m3-GGUF", "bge-m3-Q8_0.gguf"],
"local-dir": "models"
}
},
// small VLM (Qwen3.5 4B, ~3.3 GB), all layers in 4 GB VRAM: always installed, enough for 32 GB RAM machines
{
method: "hf.download",
params: {
path: "app",
_: ["unsloth/Qwen3.5-4B-GGUF", "mmproj-BF16.gguf", "Qwen3.5-4B-Q4_K_S.gguf"],
"local-dir": "models/qwen3.5-4b"
}
},
// big MoE LLM + vision projector (~23 GB, experts in RAM): only with 48+ GB RAM
{
when: "{{ram >= 48}}",
method: "hf.download",
params: {
path: "app",
_: ["unsloth/Qwen3.6-35B-A3B-GGUF", "mmproj-BF16.gguf", "Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf"],
"local-dir": "models"
}
},
// pre-build the uv script environments (whisper, prefect, sherpa-onnx, openvino, ...)
{
method: "shell.run",
params: {
path: "app",
message: [
"uv sync --script flow.py",
"uv sync --script server.py",
"uv sync --script memory.py"
]
}
},
{
method: "notify",
params: {
html: "Installation finished ({{ram >= 48 ? 'Qwen3.6 35B + Qwen3.5 4B: pick one in the Web UI header' : 'Qwen3.5 4B'}}). Click 'Start', then load the browser extension from the 'Extension' tab."
}
}
]
}