Skip to content

vllm_omni.diffusion.models.soulx_singer.modules.preprocess

Preprocess neural network modules for SoulX-Singer.

Modules:

Name Description
asr

Lyric transcription (Paraformer + Parakeet) for SoulX preprocess.

mel_grid_f0

Resample RMVPE F0 (16 kHz hop) onto the SoulX mel frame grid.

pipeline

SoulX preprocess pipeline.

rmvpe

RMVPE F0 extractor.

rosvot

ROSVOT note transcription.

segmenter

Rule-based vocal segmentation from F0 contour (no neural net).

stack

Lazy-loaded SoulX preprocess model tree.

utils

Shared helpers for SoulX preprocess (I/O, config, checkpoints, pitch).

vocal_sep

BS-RoFormer vocal separation adapter (external pip package + SoulX chunking).

SoulXPreprocessPipeline

Bases: Module, SupportAudioInput, SupportsComponentDiscovery

Lazy-loaded preprocess stack integrated with vLLM-Omni diffusion lifecycle.

hop_size instance-attribute

hop_size = int(audio_config.hop_size)

kind instance-attribute

kind = resolve_soulx_kind(od_config.model)

max_merge_duration_ms instance-attribute

max_merge_duration_ms = max_merge_duration_ms

midi_transcribe instance-attribute

midi_transcribe = midi_transcribe

od_config instance-attribute

od_config = od_config

stack instance-attribute

stack: SoulXPreprocessStack | None = None

support_audio_input class-attribute

support_audio_input: bool = True

target_sr instance-attribute

target_sr = int(audio_config.sample_rate)

verbose instance-attribute

verbose = verbose

vocal_sep instance-attribute

vocal_sep = vocal_sep

weights_sources class-attribute

weights_sources: tuple = ()

build_svc_payload_from_audio

build_svc_payload_from_audio(
    *,
    prompt_audio: str | tuple[ndarray, int],
    target_audio: str | tuple[ndarray, int],
    sample_rate: int,
    device: device | str,
    vocal_sep: bool | None = None,
) -> dict[str, Any]

build_svc_payload_from_paths staticmethod

build_svc_payload_from_paths(
    *,
    prompt_wav_path: str,
    target_wav_path: str,
    prompt_f0_path: str,
    target_f0_path: str,
    sample_rate: int,
    device: device | str,
) -> dict[str, Any]

build_svs_payload_from_audio

build_svs_payload_from_audio(
    *,
    prompt_audio: str | tuple[ndarray, int],
    target_audio: str | tuple[ndarray, int],
    metadata_processor,
    language: str = "Mandarin",
    vocal_sep: bool | None = None,
    prompt_vocal_sep: bool | None = None,
    target_vocal_sep: bool | None = None,
    prompt_max_merge_duration_ms: int | None = None,
    target_max_merge_duration_ms: int | None = None,
) -> dict[str, Any]

build_svs_payload_from_paths staticmethod

build_svs_payload_from_paths(
    *,
    prompt_metadata_path: str,
    target_metadata_path: str,
    audio_path: str,
    metadata_processor,
) -> dict[str, Any]

extract_f0

extract_f0(vocal: ndarray, sample_rate: int) -> ndarray

forward

forward(req) -> DiffusionOutput

iter_svs_metadata

iter_svs_metadata(
    audio_source: str | tuple[ndarray, int],
    *,
    language: str = "Mandarin",
    vocal_sep: bool | None = None,
    max_merge_duration_ms: int | None = None,
)

Yield merged SVS metadata dicts one segment at a time.

load_weights

load_weights(
    weights: Iterable[tuple[str, Tensor]],
) -> set[str]