Update README.md
Browse files
README.md
CHANGED
|
@@ -10,17 +10,13 @@ metrics:
|
|
| 10 |
# DeepVoiceGuard: Real-Time Audio Authenticity Detection
|
| 11 |
|
| 12 |
**DeepVoiceGuard** is an advanced AI-powered tool for detecting whether an audio file is genuine or AI-generated. Built using RawNet-based architecture and trained on ASVspoof datasets, this model is optimized for real-time inference using ONNX format.
|
| 13 |
-
|
| 14 |
---
|
| 15 |
-
|
| 16 |
## π Features
|
| 17 |
- **Real-Time Detection:** Analyze audio files quickly and efficiently to determine authenticity.
|
| 18 |
- **Sliding Window Processing:** Processes long audio files in segments for accurate classification.
|
| 19 |
- **ONNX Optimized:** Faster inference compared to traditional formats.
|
| 20 |
- **Interactive Demo:** Test the model using our Streamlit application.
|
| 21 |
-
|
| 22 |
---
|
| 23 |
-
|
| 24 |
## π Model Overview
|
| 25 |
- **Architecture:** RawNet-based Neural Network
|
| 26 |
- **Frameworks Used:** PyTorch, ONNX
|
|
@@ -28,9 +24,7 @@ metrics:
|
|
| 28 |
- **Classes:**
|
| 29 |
- **Real:** Genuine human speech
|
| 30 |
- **Fake:** AI-generated or spoofed audio
|
| 31 |
-
|
| 32 |
---
|
| 33 |
-
|
| 34 |
## π Installation
|
| 35 |
Install the necessary dependencies:
|
| 36 |
```bash
|
|
@@ -58,7 +52,6 @@ def pad(x, max_len=64600):
|
|
| 58 |
num_repeats = (max_len // x_len) + 1
|
| 59 |
padded_x = np.tile(x, (1, num_repeats))[:, :max_len][0]
|
| 60 |
return padded_x
|
| 61 |
-
|
| 62 |
# Preprocess audio for a single segment
|
| 63 |
def preprocess_audio_segment(segment, cut=64600):
|
| 64 |
"""
|
|
@@ -82,7 +75,6 @@ def download_model(url, local_path="RawNet_model.onnx"):
|
|
| 82 |
else:
|
| 83 |
raise Exception("Failed to download ONNX model")
|
| 84 |
return local_path
|
| 85 |
-
|
| 86 |
# Sliding window prediction function
|
| 87 |
def predict_with_sliding_window(audio_path, onnx_model_path, window_size=64600, step_size=64600, sample_rate=16000):
|
| 88 |
"""
|
|
@@ -125,7 +117,6 @@ def predict_with_sliding_window(audio_path, onnx_model_path, window_size=64600,
|
|
| 125 |
result = predict("example.wav")
|
| 126 |
print(f"Prediction: {result}")
|
| 127 |
```
|
| 128 |
-
|
| 129 |
π Performance Metrics
|
| 130 |
Equal Error Rate (EER): 4.21%
|
| 131 |
Accuracy: 95.8%
|
|
@@ -137,5 +128,5 @@ This project is licensed under the MIT License.
|
|
| 137 |
βοΈ Contact
|
| 138 |
For inquiries or support, please contact:
|
| 139 |
|
| 140 |
-
- GitHub: (
|
| 141 |
-
- Hugging Face: (
|
|
|
|
| 10 |
# DeepVoiceGuard: Real-Time Audio Authenticity Detection
|
| 11 |
|
| 12 |
**DeepVoiceGuard** is an advanced AI-powered tool for detecting whether an audio file is genuine or AI-generated. Built using RawNet-based architecture and trained on ASVspoof datasets, this model is optimized for real-time inference using ONNX format.
|
|
|
|
| 13 |
---
|
|
|
|
| 14 |
## π Features
|
| 15 |
- **Real-Time Detection:** Analyze audio files quickly and efficiently to determine authenticity.
|
| 16 |
- **Sliding Window Processing:** Processes long audio files in segments for accurate classification.
|
| 17 |
- **ONNX Optimized:** Faster inference compared to traditional formats.
|
| 18 |
- **Interactive Demo:** Test the model using our Streamlit application.
|
|
|
|
| 19 |
---
|
|
|
|
| 20 |
## π Model Overview
|
| 21 |
- **Architecture:** RawNet-based Neural Network
|
| 22 |
- **Frameworks Used:** PyTorch, ONNX
|
|
|
|
| 24 |
- **Classes:**
|
| 25 |
- **Real:** Genuine human speech
|
| 26 |
- **Fake:** AI-generated or spoofed audio
|
|
|
|
| 27 |
---
|
|
|
|
| 28 |
## π Installation
|
| 29 |
Install the necessary dependencies:
|
| 30 |
```bash
|
|
|
|
| 52 |
num_repeats = (max_len // x_len) + 1
|
| 53 |
padded_x = np.tile(x, (1, num_repeats))[:, :max_len][0]
|
| 54 |
return padded_x
|
|
|
|
| 55 |
# Preprocess audio for a single segment
|
| 56 |
def preprocess_audio_segment(segment, cut=64600):
|
| 57 |
"""
|
|
|
|
| 75 |
else:
|
| 76 |
raise Exception("Failed to download ONNX model")
|
| 77 |
return local_path
|
|
|
|
| 78 |
# Sliding window prediction function
|
| 79 |
def predict_with_sliding_window(audio_path, onnx_model_path, window_size=64600, step_size=64600, sample_rate=16000):
|
| 80 |
"""
|
|
|
|
| 117 |
result = predict("example.wav")
|
| 118 |
print(f"Prediction: {result}")
|
| 119 |
```
|
|
|
|
| 120 |
π Performance Metrics
|
| 121 |
Equal Error Rate (EER): 4.21%
|
| 122 |
Accuracy: 95.8%
|
|
|
|
| 128 |
βοΈ Contact
|
| 129 |
For inquiries or support, please contact:
|
| 130 |
|
| 131 |
+
- GitHub: [Mrkomiljon](https://github.com/Mrkomiljon/DeepVoiceGuard)
|
| 132 |
+
- Hugging Face: [DeepVoiceGuard](https://huggingface.co/spaces/Mrkomiljon/DeepVoiceGuard)
|