Skip to content

Implementation of Native BWF (Broadcast Wave Format) Metadata Preservation #2852

Description

@LebedevIV

The Problem:
In professional audio engineering, sound restoration, and cinematic post-production workflows, keeping exact timeline synchronization is mandatory. The industry-standard protocol for this is BWF (Broadcast Wave Format), which embeds a precise TimeReference (the absolute sample-count timestamp since the project's timeline zero-point) inside the WAV container's metadata chunk (bext).

The process is roughly as follows:
In professional digital audio workstations (DAWs, such as REAPER, Pro Tools, or Cubase), fragments containing defects are marked in a track to be restored or regenerated based on a trained voice model, creating patches. These fragments are exported with BWF tags, which also contain a TimeReference. After converting the source files to RVC, the TimeReference must be manually copied from the source files to the corresponding converted files (for example, in program BWF MetaEdit).

Currently, when any audio chunk is processed through either the RVC Single Inference or Batch Inference pipelines, the underlying audio-writing libraries (such as scipy.io.wavfile or soundfile) re-synthesize the output PCM array from scratch as a raw structural matrix. During this generation stage, all original structural headers and bext meta-tags are completely purged.

Suggested Solution:
Implement a native metadata extraction and inheritance safety protocol directly inside the inference core pipeline scripts (infer/vc/modules.py and infer/vc/pipeline.py). Before the generator executes and renders the final target audio arrays, the script should scan the primary source input file for the presence of a valid BWF header. If detected, the core should preserve the original bext block context and automatically re-compile/inject those exact metadata parameters into the newly synthesized target .wav container upon saving.

Implementing this standard 4-line metadata inheritance pass will instantly bridge the gap between AI synthesis models and industrial-grade professional audio engineering ecosystems, unlocking highly automated multi-patch non-destructive workflow configurations for thousands of studio engineers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions