mirror of
https://github.com/debpalash/VoiceStudio.git
synced 2026-12-04 01:18:16 +00:00
Scale whole-file transcription deadlines with recording duration across uploads, streaming dubbing, child engines and MCP waits. Keep queueing and setup inside the same deadline, and preserve physical worker and upload ownership when work is cancelled. Cover long recordings, child-process ceilings, fallback deadlines, finite settings, queued metadata, late model loading and cancellation cleanup with regression tests. Update engine and troubleshooting documentation.
26 lines
1.1 KiB
Python
26 lines
1.1 KiB
Python
"""Resolve test seams after other suites isolate backend modules."""
|
|
import importlib
|
|
from types import SimpleNamespace
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def m(neutral_asr_host, monkeypatch):
|
|
"""Backend seams on a CPU-only host: a test opts in to its hardware (#3549)."""
|
|
bootstrap = importlib.import_module('engines.whisper_cpp.bootstrap')
|
|
backend = importlib.import_module('engines.whisper_cpp.backend')
|
|
# Most CLI fixtures use deliberately invalid audio and mock subprocess.run.
|
|
# Duration probing has its own real-media coverage and must not hit that mock.
|
|
monkeypatch.setattr('services.ffmpeg_utils.probe_audio_duration', lambda path: None)
|
|
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)
|