File size: 1,177 Bytes
7d2310f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
license: mit
language: en
pipeline_tag: audio-classification
library_name: transformers
tags:
- deepfake
- audio
- wav2vec2
- pytorch
---

# πŸ”Š Deepfake Audio Detection Model

## πŸ“Œ Overview
This model detects whether an audio file is **REAL or FAKE (AI-generated voice)**.

It is based on **Wav2Vec2 architecture** and uses transformer-based audio embeddings.

---

## 🎯 Task
Binary Classification:
- 0 β†’ REAL AUDIO
- 1 β†’ FAKE AUDIO

---

## πŸ“₯ Input
- Audio file (.wav)
- Sampling rate: 16kHz

---

## πŸ“€ Output
- Fake probability (0 to 1)

---

## βš™οΈ Model Files
- pytorch_model.bin
- config.json
- preprocessor_config.json
- tokenizer files

---

## πŸš€ Usage

```python
from transformers import AutoProcessor, AutoModel
import librosa
import torch

processor = AutoProcessor.from_pretrained("Simma7/audio_model")
model = AutoModel.from_pretrained("Simma7/audio_model")

audio, sr = librosa.load("test.wav", sr=16000)

inputs = processor(audio, sampling_rate=16000, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)

embedding = outputs.last_hidden_state.mean(dim=1)
prob = torch.sigmoid(embedding.mean()).item()

print(prob)