Files
VoiceStudio/tests/whisper_cpp_fixtures.py
T
dutch2005 5ee41e305b feat(asr): add local whisper.cpp transcription with optional Vulkan acceleration
Run local transcription and translation while preserving CPU choices, cached checkpoint names, actual model provenance and consistent source-language choices for translation, pack setup and glossary extraction.
2026-10-26 02:55:31 +05:30

22 lines
784 B
Python

"""Resolve test seams after other suites isolate backend modules."""
import importlib
from types import SimpleNamespace
import pytest
@pytest.fixture
def m():
bootstrap = importlib.import_module('engines.whisper_cpp.bootstrap')
backend = importlib.import_module('engines.whisper_cpp.backend')
namespace = {
'wc': backend,
'WhisperCppBackend': backend.WhisperCppBackend,
'ab': importlib.import_module('services.asr_backend'),
'HostCaps': importlib.import_module('core.device_caps').HostCaps,
}
for name in ('BACKEND_ENV', 'BIN_ENV', 'DEVICE_ENV', 'DIR_ENV', 'MODEL_ENV',
'is_installed', 'locate_binary', 'resolve_model'):
namespace[name] = getattr(bootstrap, name)
return SimpleNamespace(**namespace)