Overview
On-device ASR model management plugin that handles model download, deletion, and status tracking from the Settings panel with per-file granularity progress.
Description
The ASR Models Plugin provides HTTP endpoints for on-device ASR model management. Downloads reuse the hf-proxy's multi-source accelerated fetch into the shared disk cache. Progress is reported at per-file granularity (bytes of completed files / total bytes). Supports catalog listing, background download, status polling, and model deletion. Validates file integrity via SHA-256.
Usage
- Settings UI: Users download/delete ASR models from Settings → Local Models → Local Transcription.
- Model preloading: Models can be preloaded for offline transcription.
Code Reference
Source Location
- Repository: OpenChatCut
- File: server/plugins/asr-models.ts
- Lines: 1-406
Signature
export interface AsrModelInspection {
readonly onnx: boolean;
readonly ggml: boolean;
readonly verified: boolean;
}
export const asrModelsPlugin: Plugin;
Import
import { asrModelsPlugin } from './plugins/asr-models.ts';
I/O Contract
Inputs
| Name |
Type |
Required |
Description
|
| id |
string |
Yes |
ASR model ID to download/delete
|
Outputs
| Name |
Type |
Description
|
| GET /api/asr-models |
JSON |
Catalog + per-model downloaded state
|
| POST /api/asr-models/download |
JSON |
Starts background download task
|
| GET /api/asr-models/download/:id |
JSON |
Download task status with progress
|
Usage Examples
Listing and Downloading Models
// GET /api/asr-models → list catalog with download state
// POST /api/asr-models/download { id: 'whisper-base' } → start download
// GET /api/asr-models/download/task-123 → poll progress
// POST /api/asr-models/delete { id: 'whisper-base' } → remove cached files
Related Pages
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.