feat: migrate remaining consumers to new Plugin Architecture

- Add compatibility functions to tts_plugin/compat.py:
  - get_metadata(): returns TTSBackendMetadata with voices
  - is_registered_backend(): checks if plugin is loaded
  - resolve_backend_for_voice(): resolves backend for voice spec
  - get_default_voice(): gets default voice for backend

- Update tts_plugin/__init__.py to export new functions

- Migrate all consumers from old tts_backend_registry:
  - WebUI: conversion_runner, debug_tts_runner, routes/api, routes/utils/*
  - PyQt UI: gui, predownload_gui, voice_formula_gui
  - Voice utilities: voice_cache, voice_formulas, voice_profiles
  - Other: subtitle_utils, utils, predownload_gui (root)

- Update tests to use new plugin architecture

Old architecture remains intact as fallback.
This commit is contained in:
Artem Akymenko
2026-07-12 16:20:06 +03:00
parent 25d45ffd36
commit 985e16f1f8
19 changed files with 558 additions and 407 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ from typing import cast
import pytest
from abogen.tts_backend_registry import get_metadata
from abogen.tts_plugin.compat import get_metadata
from abogen.voice_cache import (
LocalEntryNotFoundError,
_CACHED_VOICES,