Audio Classification
Transformers
Safetensors
Chinese
genaid
feature-extraction
accent-recognition
speaker-disentanglement
wav2vec2
custom_code
Instructions to use walston/GenAID with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use walston/GenAID with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("audio-classification", model="walston/GenAID", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("walston/GenAID", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 631 Bytes
378eaeb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | from transformers import PreTrainedConfig
class GenAIDConfig(PreTrainedConfig):
model_type = "genaid"
def __init__(
self,
encoder_config=None,
bottleneck_dim=64,
num_accents=9,
num_speakers=336,
accent_labels=None,
sampling_rate=16000,
**kwargs,
):
super().__init__(**kwargs)
self.encoder_config = encoder_config or {}
self.bottleneck_dim = bottleneck_dim
self.num_accents = num_accents
self.num_speakers = num_speakers
self.accent_labels = accent_labels or []
self.sampling_rate = sampling_rate
|