Vendored
+9
-4
@@ -79,11 +79,16 @@ async function ensureInit() {
|
||||
// the in-process inference surface and register the engines they own.
|
||||
mod = await import('@qvac/inference');
|
||||
const { llmPlugin } = await import('@qvac/inference/llamacpp-completion/plugin');
|
||||
const { whisperPlugin } = await import('@qvac/inference/whispercpp-transcription/plugin');
|
||||
const { ttsPlugin } = await import('@qvac/inference/tts-ggml/plugin');
|
||||
mod.registerPlugin(llmPlugin);
|
||||
mod.registerPlugin(whisperPlugin);
|
||||
mod.registerPlugin(ttsPlugin);
|
||||
// Voice engines fail independently: an unavailable ASR addon must not
|
||||
// prevent speech output or the text assistant from initializing.
|
||||
for (const [modulePath, exportName] of [
|
||||
['@qvac/inference/whispercpp-transcription/plugin', 'whisperPlugin'],
|
||||
['@qvac/inference/tts-ggml/plugin', 'ttsPlugin'],
|
||||
]) {
|
||||
try { const plugin = await import(modulePath); mod.registerPlugin(plugin[exportName]); }
|
||||
catch (error) { log(`${exportName} unavailable: ${flattenError(error)}`); }
|
||||
}
|
||||
} else {
|
||||
mod = await import('@qvac/sdk');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user