| """Compatibility package that exposes the realtime implementation at top level.""" | |
| from pathlib import Path | |
| from typing import TYPE_CHECKING | |
| from transformers.utils import _LazyModule | |
| from transformers.utils.import_utils import define_import_structure | |
| _IMPL_FILE = Path(__file__).resolve().parent.parent / "moss_tts_realtime" / "mossttsrealtime" / "__init__.py" | |
| if not _IMPL_FILE.exists(): | |
| raise ImportError(f"Unable to locate realtime implementation package at {_IMPL_FILE}") | |
| if TYPE_CHECKING: | |
| from .configuration_mossttsrealtime import * | |
| from .modeling_mossttsrealtime import * | |
| from .modeling_mossttsrealtime_local import * | |
| from .processing_mossttsrealtime import * | |
| from .streaming_mossttsrealtime import * | |
| else: | |
| import sys | |
| sys.modules[__name__] = _LazyModule( | |
| __name__, | |
| str(_IMPL_FILE), | |
| define_import_structure(str(_IMPL_FILE)), | |
| module_spec=__spec__, | |
| ) | |