SteerSound / README.md
GeWu-Lab's picture
Clarify pretraining and fine-tuning with standard FM
0056de9 verified
|
Raw History Blame Contribute Delete
10.7 kB
metadata
language:
  - en
task_categories:
  - audio-to-audio
configs:
  - config_name: complex
    data_files:
      - split: val
        path: complex_val/metadata.parquet
      - split: test
        path: complex_test/metadata.parquet
  - config_name: selective
    data_files:
      - split: train
        path: selective_train/metadata.parquet
      - split: val
        path: selective_val/metadata.parquet
      - split: test
        path: selective_test/metadata.parquet
dataset_info:
  - features:
      - name: sample_id
        dtype: string
      - name: split
        dtype: string
      - name: task
        dtype: string
      - name: task_id
        dtype: int64
      - name: instruction
        dtype: string
      - name: input_audio_path
        dtype: string
      - name: target_audio_path
        dtype: string
      - name: use_base
        dtype: bool
      - name: source_label
        dtype: string
      - name: base_label
        dtype: 'null'
      - name: destination_label
        dtype: string
      - name: target_label
        dtype: string
      - name: specific_time
        dtype: string
      - name: condition_type
        dtype: string
      - name: condition_type2
        dtype: string
      - name: change_vol
        dtype: float64
      - name: change_Pitch
        dtype: float64
      - name: base_labels
        sequence: string
      - name: add_labels
        sequence: string
      - name: remove_labels
        sequence: string
      - name: edit_start_sample
        dtype: int64
      - name: edit_end_sample
        dtype: int64
      - name: preserve_start_sample
        dtype: int64
      - name: preserve_end_sample
        dtype: int64
      - name: a_start_sample
        dtype: 'null'
      - name: a_end_sample
        dtype: 'null'
      - name: b_start_sample
        dtype: 'null'
      - name: b_end_sample
        dtype: 'null'
      - name: swap_layout
        dtype: 'null'
      - name: cfg_scale
        dtype: float64
      - name: setting_name
        dtype: string
      - name: pitch_change_label
        sequence: string
      - name: volume_change_label
        sequence: string
      - name: start_time
        dtype: float64
      - name: end_time
        dtype: float64
      - name: feature_audio1_used
        dtype: bool
      - name: feature_audio2_used
        dtype: bool
    config_name: complex
  - features:
      - name: sample_id
        dtype: string
      - name: split
        dtype: string
      - name: task
        dtype: string
      - name: task_id
        dtype: int64
      - name: instruction
        dtype: string
      - name: input_audio_path
        dtype: string
      - name: target_audio_path
        dtype: string
      - name: use_base
        dtype: bool
      - name: source_label
        dtype: string
      - name: base_label
        dtype: string
      - name: destination_label
        dtype: string
      - name: target_label
        dtype: string
      - name: specific_time
        dtype: string
      - name: condition_type
        dtype: string
      - name: condition_type2
        dtype: string
      - name: change_vol
        dtype: float64
      - name: change_Pitch
        dtype: float64
      - name: base_labels
        dtype: string
      - name: add_labels
        dtype: string
      - name: remove_labels
        dtype: string
      - name: edit_start_sample
        dtype: int64
      - name: edit_end_sample
        dtype: int64
      - name: preserve_start_sample
        dtype: int64
      - name: preserve_end_sample
        dtype: int64
      - name: a_start_sample
        dtype: float64
      - name: a_end_sample
        dtype: float64
      - name: b_start_sample
        dtype: float64
      - name: b_end_sample
        dtype: float64
      - name: swap_layout
        dtype: bool
    config_name: selective

Project Page GitHub Code Hugging Face Weights Hugging Face Dataset

SteerSound audio editing data

Paper: Steer Unified Audio Editing Toward Reliable Source Selection

Six tasks: Addition (0), Removal (1), Generation (2), Replacement (3), Volume Modification (4), Pitch Modification (5). Instructions are plain English. Model-specific prompt/control prefixes are not part of the data; the SteerSound text encoder inserts them internally during inference/training.

Public folder Rows Rows/task Paired target audio
complex_val 6,000 1,000 Yes
complex_test 6,000 1,000 Yes
selective_train 61,440 10,240 Yes
selective_val 6,000 1,000 No
selective_test 6,000 1,000 No

Every folder contains metadata.parquet, audio.zip and manifest.json with SHA256 hashes. Audio members preserve their original bytes, member names and directory layout. Audio is 16 kHz mono PCM16, 10 seconds per sample. ZIP paths are stored relative to the archive, such as audios/val/input/...wav; changing the public folder name does not change these member paths. Complex val/test and Selective train contain input and reference-target audio. Selective val/test contain input audio only and have empty target paths. Selective val/test are evaluated with task-success rules. No target audio is synthesized or padded into the metadata.

Continue training

Pretraining and fine-tuning with standard FM: follow Source audio and preparation to prepare the paper's source audio or your own audio–caption data. This shared guide covers source dataset links, formats, processing steps, and expected outputs. Editing examples are constructed online. Use the standard training guide to pretrain or fine-tune, then evaluate on Complex val/test.

STEER post-training: start from the released SteerSound checkpoint and choose one of these settings:

  1. Complex audio editing data: prepare the paper's source audio or your own audio–caption data with the same Source audio and preparation guide. Apply Emphasis or Recovery with online editing-example construction; validate and evaluate on complex_val / complex_test.
  2. Selective audio editing data: download the released selective_train, selective_val, and selective_test from the 🤗 dataset. Follow Emphasis / Selective or Recovery / Selective to post-train on the supplied editing pairs and evaluate on the corresponding splits.

Read metadata

from datasets import load_dataset
complex_val = load_dataset("GeWu-Lab/SteerSound", "complex", split="val")
selective_train = load_dataset("GeWu-Lab/SteerSound", "selective", split="train")

Install datasets>=3.6.0 to use the metadata-loading examples. These return the parquet metadata, not decoded audio. Complex and Selective have different schemas, so they are separate configs instead of a null-padded merged table. Within Selective, training-only and evaluation-only fields have a declared common nullable schema so the three splits load together. Existing missing values stay missing; no metadata values or audio are filled in. The original split values remain train/val/test; the top-level names identify the dataset and split together.

Read a WAV and edit it

import io, zipfile
import pandas as pd
import soundfile as sf
from huggingface_hub import hf_hub_download
from steersound import SteerSoundPipeline  # install code from the linked GitHub repository

repo = "GeWu-Lab/SteerSound"
folder = "selective_val"
metadata = hf_hub_download(repo, f"{folder}/metadata.parquet", repo_type="dataset")
archive = hf_hub_download(repo, f"{folder}/audio.zip", repo_type="dataset")
row = pd.read_parquet(metadata).iloc[0]
with zipfile.ZipFile(archive) as z:
    wave, sr = sf.read(io.BytesIO(z.read(row.input_audio_path)), dtype="float32")
pipe = SteerSoundPipeline.from_pretrained(repo, device="cuda")
# Exact numeric metadata matters: instruction text may round the amount to one decimal.
edited = pipe.edit_record(row.instruction, wave, sample_rate=sr,
                         task_id=int(row.task_id), change_vol=float(row.change_vol),
                         change_pitch=float(row.change_Pitch), sample_id=str(row.sample_id))
sf.write("edited.wav", edited, 16000, subtype="PCM_16")

For interactive use, pipe("Remove the sound of a dog barking.", audio="input.wav") parses task and amount automatically. See the model card and GitHub inference instructions for GPU installation, all six instruction examples and estimated VRAM.

Metadata and evaluation

sample_id, sample order, task IDs, all numeric changes and task-region boundaries match the source data. The model-specific instruction prefix was removed. Complex val/test retain their original reference targets and target paths; Selective val/test have empty target paths. All remaining input WAV bytes are preserved. input_audio_path and optional target_audio_path name WAV members inside audio.zip. change_vol is signed dB; change_Pitch is signed semitones; region columns ending in _sample use 16 kHz sample coordinates. Source labels, base/add/remove label lists, condition and timing metadata are retained. Do not infer exact changes solely from rounded instruction strings.

The full Complex evaluation protocol uses task-aware CLAP, softmax KL, pitch/volume MAE, LSD and TBG. The released Complex val/test splits include the ground-truth targets required for KL, MAE, LSD, and the full six-task TBG. TBG additionally requires a baseline-model summary on the same split; see the evaluation guide. Task-aware CLAP uses labels and generated audio without paired targets. Selective uses the original task-success and error rules; unmeasurable pitch pairs are excluded from the accuracy denominator. Validation selects checkpoints. Test is used only after selection.