Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,511 Bytes
c7f3ffb 19b877f c7f3ffb 19b877f c7f3ffb 19b877f c7f3ffb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
"""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
# Core tools
from .f0_extraction import F0Extractor
from .vocal_detection import VocalDetector
# Some tools may live outside this package in different layouts across branches.
# Keep the public surface stable while avoiding hard import failures.
try:
from .vocal_separation.model import VocalSeparator # type: ignore
except ImportError: # pragma: no cover
VocalSeparator = None # type: ignore
try:
from .note_transcription.model import NoteTranscriber # type: ignore
except ImportError: # pragma: no cover
NoteTranscriber = None # type: ignore
try:
from .lyric_transcription import LyricTranscriber
except ImportError: # pragma: no cover
LyricTranscriber = None # type: ignore
__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")
|