Plugin
Demucs v4 audio source separation plugin — provides vocals extraction for removing background noise and music from speech audio.
Imports
Configuration
DemucsPluginConfig
def DemucsPluginConfig(
model:str='htdemucs', device:str='auto', shifts:int=1, overlap:float=0.25, segment:Optional=None,
save_other_stems:bool=False, output_format:str='wav'
)->None:
Configuration for the Demucs processing plugin.
Plugin Class
DemucsProcessingPlugin
def DemucsProcessingPlugin(
):
Demucs v4 source separation plugin for vocals extraction.
DemucsProcessingPlugin.prefetch
def prefetch(
)->None:
CR-4 (SG-19): eagerly load the model so the first execute() doesn’t pay the download/load cost. Idempotent via _load_model’s None-guard.
DemucsProcessingPlugin.on_disable
def on_disable(
)->None:
CR-2: release the GPU model when the operator disables the plugin (the worker stays alive); lazy reload on the next execute after re-enable.
DemucsProcessingPlugin.cleanup
def cleanup(
)->None:
Clean up plugin resources.
DemucsProcessingPlugin.is_available
def is_available(
)->bool: # Whether the plugin can run
Check if the plugin is available on this system.