VeriSpoof-Plus / code /README.md
AustinXiao's picture
Model card preview (private, no weights yet)
0b1c9f1 verified
|
Raw History Blame Contribute Delete
1.79 kB

verispoof

Inference package for VeriSpoof, one audio language model for speech deepfake detection, source verification and grounded reasoning. Model cards: https://huggingface.co/AustinXiao/VeriSpoof-Plus and https://huggingface.co/AustinXiao/VeriSpoof-Base (the same package serves both)

from verispoof import VeriSpoof

model = VeriSpoof.from_pretrained("AustinXiao/VeriSpoof-Plus")   # or VeriSpoof-Base, or a local folder
model.detect("sample.wav")                 # {'label': 'spoof' | 'bonafide', 'score': log p(spoof) - log p(bona fide)}
model.explain("sample.wav")                # reasoning lines, decision, spans, per-token probabilities
model.same_source("a.wav", "b.wav")        # same generator? (also level="acoustic_model" / "vocoder")
model.compare("a.wav", "b.wav")            # source-verification reasoning
model.condition("sample.wav", attr="codec")
model.generator("sample.wav", ["XTTS-v2", "Bark"])

Needs a CUDA GPU (about 12 GB) and transformers >= 5.13.

Faster reasoning with vLLM (pip install "./code[vllm]"), generation only:

from verispoof.vllm_backend import VeriSpoofVLLM

if __name__ == "__main__":          # vLLM starts its engine in a separate process
    m = VeriSpoofVLLM.from_pretrained("AustinXiao/VeriSpoof-Plus")
    m.explain(["a.wav", "b.wav", "c.wav"])   # batched
    m.compare([("a.wav", "b.wav")])

Files

verispoof/encoder.py audio encoder
verispoof/audio_tokenizer.py audio tokenizer
verispoof/model.py encoder → tokenizer → language model, per-token head, prompt layout
verispoof/inference.py the VeriSpoof API: candidate scoring and greedy reasoning
verispoof/vllm_backend.py VeriSpoofVLLM: reasoning with vLLM from prompt embeddings