Skip to content

Migration towards a python package version. - #20

Open
nhamilakis wants to merge 3 commits into
LAAC-LSCP:mainfrom
nhamilakis:api-migration
Open

Migration towards a python package version.#20
nhamilakis wants to merge 3 commits into
LAAC-LSCP:mainfrom
nhamilakis:api-migration

Conversation

@nhamilakis

@nhamilakis nhamilakis commented Jul 23, 2026

Copy link
Copy Markdown

The goal is to simplify usage of the VTC inference pipeline.

This adds two different modes of execution that use the same code:

Command line :

$ uv run vtc-infer \
    --wavs audios_path \
    --output $output

With (almost) the same arguments as before.

A Python API mode :

from vtc_inference import run_vtc

run_vtc(
    output="results/my_run",
    checkpoint="2.2",
    config="2.2", 
    wavs="data/my_wavs",
)

The model & resource (thresholds & config) is handled fully by huggingface cache, so there is no need to keep those in the repo, their download is automatic and is referenced by the following mapping:

MODEL_TO_REVISION = {
    "2.2": "91167f6",
    "2.1": "91167f6",
    "2.0": "91e67b5",
}

These map to a commit on the model repository.
For backward compatibility, a local path can still be passed instead of a version for config/checkpoint & threshold files.

This pull request is meant to replace #17, which seems to have been a bit forgotten.

@nhamilakis

nhamilakis commented Jul 23, 2026

Copy link
Copy Markdown
Author

I wanted to keep it as backwards compatible as possible, but we could make the checkpoint argument more explicit.
For example, have a --model-version 2.2 and a --checkpoint-path /path/to/best.ckpt that overrides it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant