vllm_omni.diffusion.models.soulx_singer.utils ¶
MetadataProcessor ¶
Data processor for SoulX-Singer
preprocess ¶
preprocess(
note_duration: list[float],
phonemes: list[str],
note_pitch: list[int],
note_type: list[int],
)
Insert
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
note_duration | list[float] | Duration of each note in seconds | required |
phonemes | list[str] | Phoneme sequence for each note | required |
note_pitch | list[int] | Pitch value for each note | required |
note_type | list[int] | Type value for each note | required |
build_vocal_segments ¶
build_vocal_segments(
f0,
*,
f0_rate: int = 50,
ignore_silent_frames_thresh: int = 5,
min_duration_sec_per_segment: float = 5.0,
max_duration_sec_per_segment: float = 30.0,
num_overlaps: int = 1,
ignore_silent_frames: bool = True,
) -> tuple[
list[tuple[float, float]], list[tuple[float, float]]
]
Build vocal segments from an F0 contour for chunked SVC inference.
f0_to_coarse ¶
Convert continuous F0 values to discrete F0 bins (SIL and C1 - B6, 361 bins). args: f0: continuous F0 values f0_bin: number of F0 bins f0_min: minimum F0 value f0_shift: shift value for F0 bins returns: f0_coarse: discrete F0 bins
load_config ¶
Load a configuration file and optionally merges it with a base configuration.
Args: config_path (Path): Path to the configuration file.
load_model_config_json ¶
Load config.json from a SoulX-Singer model view directory.
load_wav ¶
preprocess_weight_paths ¶
Map upstream relative paths to absolute paths under weights_root.
resolve_phoneset_path ¶
Resolve phoneme vocabulary; must be present in model directory.
resolve_pitch_shift ¶
resolve_pitch_shift(
*,
auto_shift: bool,
manual_shift: int,
prompt_f0: Tensor | None = None,
target_f0: Tensor | None = None,
prompt_note_pitch: Tensor | None = None,
target_note_pitch: Tensor | None = None,
) -> int
Resolve semitone shift for auto_shift; f0_to_coarse(..., f0_shift=shift * 5) consumes it.
resolve_preprocess_weights_root ¶
resolve_preprocess_weights_root(
od_config: OmniDiffusionConfig,
) -> Path
Locate preprocess weights on disk or download from Hugging Face.
resolve_soulx_kind ¶
Resolve SVS vs SVC from config.json architectures[0].