Skip to main content

vcref (Python)

Read, write and verify .vcref voice reference bundles. Format: SPEC.md.

pip install vcref            # no dependencies
pip install "vcref[audio]"   # + soundfile/numpy: decode clips to arrays, pack from WAV/ndarray
import vcref

with vcref.Bundle("dean.vcref") as b:          # path, bytes or file object
    b.name, b.default, b.tags, b.config, b.cadence, b.id
    b.verify()                                  # SHA-256 of every clip and part
    tag = b.select_tag("Really?")               # first matching rule, else the default
    clip = b.clip(tag)                          # Clip(tag, text, seconds, label, sample_rate, flac)
    audio, sr = b.read(tag)                     # float32 array (needs the audio extra)
    b.unpack("out/")                            # <tag>.flac + <tag>.txt (wav=True for WAV)

vcref.pack("voice.vcref",
           {"neutral": {"wav": "neutral.wav", "text": "What is said in the clip."},
            "question": {"flac": flac_bytes, "text": "Is it?"}},
           name="voice", rules=[{"pattern": r"\?\s*$", "tag": "question"}], config={"engine": "voxcpm"})

vcref.set_cadence("voice.vcref", cadence_dict)  # rewrite only the cadence block

Errors are vcref.VcrefError. Command line: vcref info|verify <file>, vcref unpack <file> <dir> [--wav].

Choosing and inspecting references

b.explain("Really?")                 # {'tag', 'why': 'rule'|'default', 'rule', 'pattern'}
b.prompt("Really?", stack=True)      # [selected clip, default clip] ready for a TTS prompt
b.search("podcast")                  # tags whose tag, label or transcript contain the text
b.stats()                            # clip/part bytes, kbps, pcm16_ratio, per-clip sizes (no decoding)

Guides: compression, extracting references, best practices.

Metadata

Release files for vcref 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vcref 0.2.0
File Size Uploaded Provenance Actions
vcref-0.2.0.tar.gz 7.9 kB With provenance Details for vcref-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vcref 0.2.0
File Interpreter ABI Platform Actions
vcref-0.2.0-py3-none-any.whl Python 3 none any Details for vcref-0.2.0-py3-none-any.whl

Total release size: 16.2 kB

Release files / vcref-0.2.0.tar.gz

Download URL vcref-0.2.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6a540844276dd23c15eb1a9cc95a11c74882d34140e6c6d8a8a0135137668204
BLAKE2b-256 checksum
How to use checksums
6e19db6cc7a6bf0801d51c9f13f5f82da264c71aa94c3999d3186a66b1d4799d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / vcref-0.2.0-py3-none-any.whl

Download URL vcref-0.2.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8acf30517abc7725a07de0d4025e3544f0f05e53c8a33db0c5ff190ceffd9361
BLAKE2b-256 checksum
How to use checksums
fc302d9d70b48adf3e57011316b6d70bd25efd290f2ae021816317bf688b9832
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for vcref 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vcref-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page