| """Preprocess tools. |
| |
| This package provides a thin, stable import surface for common preprocess components. |
| |
| Examples: |
| from preprocess.tools import ( |
| F0Extractor, |
| PitchExtractor, |
| VocalDetectionModel, |
| VocalSeparationModel, |
| VocalExtractionModel, |
| NoteTranscriptionModel, |
| LyricTranscriptionModel, |
| ) |
| |
| Note: |
| Keep these imports lightweight. If a tool pulls heavy dependencies at import time, |
| consider switching to lazy imports. |
| """ |
|
|
| from __future__ import annotations |
|
|
| |
| from .f0_extraction import F0Extractor |
| from .vocal_detection import VocalDetector |
|
|
| |
| |
| try: |
| from .vocal_separation.model import VocalSeparator |
| except Exception: |
| VocalSeparator = None |
|
|
| try: |
| from .note_transcription.model import NoteTranscriber |
| except Exception: |
| NoteTranscriber = None |
| try: |
| from .lyric_transcription import LyricTranscriber |
| except Exception: |
| LyricTranscriber = None |
|
|
| __all__ = [ |
| "F0Extractor", |
| "VocalDetector", |
| ] |
|
|
| if VocalSeparator is not None: |
| __all__.append("VocalSeparator") |
| if LyricTranscriber is not None: |
| __all__.append("LyricTranscriber") |
| if NoteTranscriber is not None: |
| __all__.append("NoteTranscriber") |
|
|