Fix Bare voice models and extension registration
Rolling release / release (push) Successful in 7m11s

This commit is contained in:
2026-09-11 16:29:34 -04:00
parent fee584673d
commit 049ed48787
5 changed files with 14 additions and 6 deletions
+5 -3
View File
@@ -99,16 +99,18 @@ function resolveModelConfigAssets(sdk, config) {
/** Load ASR/TTS models in the same SDK worker and under the same master lock. /** Load ASR/TTS models in the same SDK worker and under the same master lock.
* These are auxiliary model IDs; they do not create another QVAC runtime. */ * These are auxiliary model IDs; they do not create another QVAC runtime. */
export async function loadAuxiliaryModel(name, modelConfig = {}) { export async function loadAuxiliaryModel(name, modelConfig = {}, modelType = undefined) {
if (!name) throw new Error('auxiliary QVAC model name is required'); if (!name) throw new Error('auxiliary QVAC model name is required');
const existing = auxiliaryModels.get(String(name)); const existing = auxiliaryModels.get(String(name));
if (existing) return existing; if (existing) return existing;
const sdk = await qvacSdk(); const sdk = await qvacSdk();
if (typeof sdk.loadModel !== 'function') throw new Error('QVAC SDK does not expose loadModel()'); if (typeof sdk.loadModel !== 'function') throw new Error('QVAC SDK does not expose loadModel()');
const modelId = await withQvacMaster(() => sdk.loadModel({ const loadOptions = {
modelSrc: resolveSdkAsset(sdk, name), modelSrc: resolveSdkAsset(sdk, name),
modelConfig: { ...resolveModelConfigAssets(sdk, modelConfig), device: 'gpu', gpu_layers: QVAC_MASTER.gpuLayers, 'mmproj-use-gpu': true }, modelConfig: { ...resolveModelConfigAssets(sdk, modelConfig), device: 'gpu', gpu_layers: QVAC_MASTER.gpuLayers, 'mmproj-use-gpu': true },
})); };
if (modelType) loadOptions.modelType = modelType;
const modelId = await withQvacMaster(() => sdk.loadModel(loadOptions));
auxiliaryModels.set(String(name), modelId); auxiliaryModels.set(String(name), modelId);
return modelId; return modelId;
} }
+2 -2
View File
@@ -11,8 +11,8 @@ export class QvacVoiceAdapter extends EventEmitter {
assertSdkVersion(); assertSdkVersion();
await acquireQvac(); this.acquired = true; await acquireQvac(); this.acquired = true;
try { try {
this.asrId = await loadAuxiliaryModel(this.asrModel, { vadModelSrc: 'VAD_SILERO_5_1_2', audio_format: 's16le', language: 'en', no_timestamps: true, vad_params: { threshold: 0.6, min_speech_duration_ms: 300, min_silence_duration_ms: 700, max_speech_duration_s: 15, speech_pad_ms: 200 } }); this.asrId = await loadAuxiliaryModel(this.asrModel, { vadModelSrc: 'VAD_SILERO_5_1_2', audio_format: 's16le', language: 'en', no_timestamps: true, vad_params: { threshold: 0.6, min_speech_duration_ms: 300, min_silence_duration_ms: 700, max_speech_duration_s: 15, speech_pad_ms: 200 } }, 'whisper');
this.ttsId = await loadAuxiliaryModel(this.ttsModel, { ttsEngine: 'supertonic', language: 'en', voice: 'F1', ttsSpeed: 1.05, ttsNumInferenceSteps: 5 }); this.ttsId = await loadAuxiliaryModel(this.ttsModel, { ttsEngine: 'supertonic', language: 'en', voice: 'F1', ttsSpeed: 1.05, ttsNumInferenceSteps: 5 }, 'tts');
} catch (error) { await this.stop(); throw error; } } catch (error) { await this.stop(); throw error; }
} }
+3
View File
@@ -4,6 +4,9 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
OUT_DIR="${ROOT_DIR}/dist" OUT_DIR="${ROOT_DIR}/dist"
mkdir -p "${OUT_DIR}" mkdir -p "${OUT_DIR}"
rm -f "${OUT_DIR}/jarvis-qvac-extension.zip" rm -f "${OUT_DIR}/jarvis-qvac-extension.zip"
if command -v glib-compile-schemas >/dev/null; then
glib-compile-schemas "${ROOT_DIR}/apps/gnome-extension/[email protected]/schemas" >/dev/null
fi
( cd "${ROOT_DIR}/apps/gnome-extension" && zip -q -r "${OUT_DIR}/jarvis-qvac-extension.zip" "[email protected]" -x '*/__pycache__/*' -x '*.pyc' ) ( cd "${ROOT_DIR}/apps/gnome-extension" && zip -q -r "${OUT_DIR}/jarvis-qvac-extension.zip" "[email protected]" -x '*/__pycache__/*' -x '*.pyc' )
test -s "${OUT_DIR}/jarvis-qvac-extension.zip" test -s "${OUT_DIR}/jarvis-qvac-extension.zip"
echo "${OUT_DIR}/jarvis-qvac-extension.zip" echo "${OUT_DIR}/jarvis-qvac-extension.zip"
+4 -1
View File
@@ -3,7 +3,7 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
command -v zip >/dev/null || { echo "zip is required to register the GNOME extension" >&2; exit 1; } command -v zip >/dev/null || { echo "zip is required to register the GNOME extension" >&2; exit 1; }
APP_DIR="${HOME}/.local/share/jarvis-qvac" APP_DIR="${HOME}/.local/share/jarvis-qvac"
EXT_DIR="${HOME}/.local/share/gnome-shell/extensions/[email protected]" EXT_DIR="${XDG_DATA_HOME:-${HOME}/.local/share}/gnome-shell/extensions/[email protected]"
CONFIG_DIR="${HOME}/.config/jarvis" CONFIG_DIR="${HOME}/.config/jarvis"
CACHE_DIR="${XDG_CACHE_HOME:-${HOME}/.cache}/jarvis/models" CACHE_DIR="${XDG_CACHE_HOME:-${HOME}/.cache}/jarvis/models"
mkdir -p "${APP_DIR}" "${EXT_DIR}" "${CONFIG_DIR}" "${HOME}/.config/systemd/user" "${CACHE_DIR}" mkdir -p "${APP_DIR}" "${EXT_DIR}" "${CONFIG_DIR}" "${HOME}/.config/systemd/user" "${CACHE_DIR}"
@@ -35,6 +35,9 @@ if command -v gnome-extensions >/dev/null && gnome-extensions install --force "$
else else
cp -a "${ROOT_DIR}/apps/gnome-extension/[email protected]/." "${EXT_DIR}/" cp -a "${ROOT_DIR}/apps/gnome-extension/[email protected]/." "${EXT_DIR}/"
fi fi
if command -v glib-compile-schemas >/dev/null && [[ -d "${EXT_DIR}/schemas" ]]; then
glib-compile-schemas "${EXT_DIR}/schemas" >/dev/null
fi
sed "s#__JARVIS_BARE__#${BARE_BIN}#" "${ROOT_DIR}/packaging/jarvisd.service" > "${HOME}/.config/systemd/user/jarvisd.service" sed "s#__JARVIS_BARE__#${BARE_BIN}#" "${ROOT_DIR}/packaging/jarvisd.service" > "${HOME}/.config/systemd/user/jarvisd.service"
if [[ ! -f "${CONFIG_DIR}/qvac.config.json" ]]; then if [[ ! -f "${CONFIG_DIR}/qvac.config.json" ]]; then
sed "s#__JARVIS_CACHE__#${CACHE_DIR}#g" "${ROOT_DIR}/packaging/qvac.config.template.json" > "${CONFIG_DIR}/qvac.config.json" sed "s#__JARVIS_CACHE__#${CACHE_DIR}#g" "${ROOT_DIR}/packaging/qvac.config.template.json" > "${CONFIG_DIR}/qvac.config.json"