Audio Classification
Transformers
Safetensors
multilingual
wav2vec2-dual-hypersphere
audio-deepfake
deepfake-detection
deepfake
voice-cloning
anti-spoofing
asvspoof
wav2vec2
speech
audio
synthetic-voice
voice-conversion
tts-detection
trust-and-safety
security
SoTA
Modotte
custom_code
Instructions to use Modotte/AIRealNet-Audio with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Modotte/AIRealNet-Audio with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("audio-classification", model="Modotte/AIRealNet-Audio", trust_remote_code=True)# Load model directly from transformers import AutoModelForAudioClassification model = AutoModelForAudioClassification.from_pretrained("Modotte/AIRealNet-Audio", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration.py from Modotte/AIRealNet-Audio: direct link, hf CLI and curl.
- Browser
- Download file 938 Bytes
-
https://huggingface.co/Modotte/AIRealNet-Audio/resolve/main/configuration.py
- Command line
-
hf download hf://Modotte/AIRealNet-Audio/configuration.py
-
curl -L -o configuration.py https://huggingface.co/Modotte/AIRealNet-Audio/resolve/main/configuration.py
938 Bytes
| from transformers import Wav2Vec2Config | |
| class Wav2Vec2DualHypersphereConfig(Wav2Vec2Config): | |
| model_type = "wav2vec2-dual-hypersphere" | |
| def __init__( | |
| self, | |
| classifier_proj_size=256, | |
| final_dropout=0.1, | |
| freeze_feat_extract_train=True, | |
| **kwargs, | |
| ): | |
| # Ensure default classification metadata is set before calling super | |
| if "num_labels" not in kwargs: | |
| kwargs["num_labels"] = 2 | |
| if "id2label" not in kwargs: | |
| kwargs["id2label"] = {0: "AI Voice (Fake)", 1: "Human Voice (Real)"} | |
| if "label2id" not in kwargs: | |
| kwargs["label2id"] = {"AI Voice (Fake)": 0, "Human Voice (Real)": 1} | |
| super().__init__(**kwargs) | |
| self.classifier_proj_size = classifier_proj_size | |
| self.final_dropout = final_dropout | |
| self.freeze_feat_extract_train = freeze_feat_extract_train | |
| __all__ = ["Wav2Vec2DualHypersphereConfig"] |