CoolFace
Apppublic

Soul-AILab/SoulX-Singer

sourceHugging Faceupdated 7mo agoView on Hugging Face
185likes
__init__.py54 linesDownload Raw Back to tools
1"""Preprocess tools.2 3This package provides a thin, stable import surface for common preprocess components.4 5Examples:6    from preprocess.tools import (7        F0Extractor,8        PitchExtractor,9        VocalDetectionModel,10        VocalSeparationModel,11        VocalExtractionModel,12        NoteTranscriptionModel,13        LyricTranscriptionModel,14    )15 16Note:17    Keep these imports lightweight. If a tool pulls heavy dependencies at import time,18    consider switching to lazy imports.19"""20 21from __future__ import annotations22 23# Core tools24from .f0_extraction import F0Extractor25from .vocal_detection import VocalDetector26 27# Some tools may live outside this package in different layouts across branches.28# Keep the public surface stable while avoiding hard import failures.29try:30    from .vocal_separation.model import VocalSeparator  # type: ignore31except ImportError:  # pragma: no cover32    VocalSeparator = None  # type: ignore33 34try:35    from .note_transcription.model import NoteTranscriber  # type: ignore36except ImportError:  # pragma: no cover37    NoteTranscriber = None  # type: ignore38try:39    from .lyric_transcription import LyricTranscriber40except ImportError:  # pragma: no cover41    LyricTranscriber = None  # type: ignore42 43__all__ = [44    "F0Extractor",45    "VocalDetector",46]47 48if VocalSeparator is not None:49    __all__.append("VocalSeparator")50if LyricTranscriber is not None:51    __all__.append("LyricTranscriber")52if NoteTranscriber is not None:53    __all__.append("NoteTranscriber")54