feat: add Rust CLI support for ASR processor

新增:
- ASR Rust CLI 支持(備用方案)
- ToolSelector 支持 rust_asr 工具

配置:
- Whisper CLI: 優先(Apple MLX 加速)
- Rust ASR: 備用(待實現)

工具優先級:
1. whisper (priority=0, enabled=true)
2. rust (priority=1, enabled=false)

目的:
- 為未來 Rust ASR 實現預留接口
- 保持配置擴展性
This commit is contained in:
Accusys
2026-09-28 01:53:20 +08:00
parent 63366e23c1
commit 0af9082aa9
2 changed files with 14 additions and 3 deletions
+8 -1
View File
@@ -61,8 +61,15 @@
"priority": 0, "priority": 0,
"enabled": true, "enabled": true,
"parameters": { "parameters": {
"model": "large-v3" "model": "large-v3",
"model_dir": "/Users/accusys/models/whisper-small-mlx"
} }
},
{
"name": "rust",
"priority": 1,
"enabled": false,
"parameters": {}
} }
], ],
"default_tool": "whisper", "default_tool": "whisper",
+6 -2
View File
@@ -100,8 +100,12 @@ impl ToolSelector {
// ASR processor tools // ASR processor tools
("asr", "whisper") => { ("asr", "whisper") => {
let script = executor.script_path("asr_processor.py"); let whisper_cli = std::path::Path::new("/opt/homebrew/bin/whisper");
if script.exists() { Some(script) } else { None } if whisper_cli.exists() { Some(whisper_cli.to_path_buf()) } else { None }
}
("asr", "rust") => {
// Future: Rust ASR implementation
executor.rust_binary_path("rust_asr")
} }
// OCR processor tools // OCR processor tools