fix: piper 二进制+依赖库+config 修正 (符号链接指向正确二进制,加 LD_LIBRARY_PATH 和 -c 参数)

This commit is contained in:
2026-07-04 16:58:41 +08:00
parent 706b1375ce
commit 4fd7e7997e
7 changed files with 62 additions and 13 deletions

View File

@@ -48,6 +48,8 @@ impl AiPlugin {
model_store: PathBuf,
tools_dir: PathBuf,
whisper_lib_dir: Option<PathBuf>,
piper_lib_dir: Option<PathBuf>,
piper_config: Option<PathBuf>,
tmp_dir: PathBuf,
context_window: usize,
) -> Self {
@@ -55,6 +57,9 @@ impl AiPlugin {
if let Some(lib_dir) = whisper_lib_dir {
backend_builder = backend_builder.with_whisper_lib_dir(lib_dir);
}
if let (Some(lib_dir), Some(config)) = (piper_lib_dir, piper_config) {
backend_builder = backend_builder.with_piper_deps(lib_dir, config);
}
let backend = Box::new(backend_builder);
let models = model_manager::ModelManager::new(model_store);
let pipeline = ChatPipeline::new(backend, models, tmp_dir, context_window);