griko commited on
Commit
f11a364
·
verified ·
1 Parent(s): ac91592

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +14 -17
README.md CHANGED
@@ -5,7 +5,6 @@ datasets:
5
  - voxceleb2
6
  libraries:
7
  - speechbrain
8
- - transformers
9
  tags:
10
  - gender-classification
11
  - speaker-characteristics
@@ -35,36 +34,34 @@ The model was trained on VoxCeleb2 dataset:
35
  - Test set: 1,647 speakers (828 females, 819 males)
36
  - No speaker overlap between sets
37
  - Audio preprocessing:
38
- - Converted to WAV format
39
- - Single channel
40
- - 16kHz sampling rate
41
- - Applied SileroVAD for voice activity detection
42
 
43
  ## Installation
44
- Install the required dependencies:
45
- ```bash
46
- pip install -r requirements.txt
47
- ```
48
- Or install individually:
49
  ```bash
50
- pip install scikit-learn pandas soundfile speechbrain torch torchaudio transformers
51
  ```
52
 
53
  ## Usage
54
 
55
  ```python
56
- from transformers import pipeline
57
- from modeling_gender import GenderClassificationPipeline
58
 
59
  # Load the pipeline
60
- classifier = pipeline(
61
- "audio-classification",
62
- model="griko/gender_cls_svm_ecapa_voxceleb",
63
- pipeline_class=GenderClassificationPipeline
64
  )
65
 
 
66
  result = classifier("path/to/audio.wav")
67
  print(result) # ["female"] or ["male"]
 
 
 
 
68
  ```
69
 
70
  ## Limitations
 
5
  - voxceleb2
6
  libraries:
7
  - speechbrain
 
8
  tags:
9
  - gender-classification
10
  - speaker-characteristics
 
34
  - Test set: 1,647 speakers (828 females, 819 males)
35
  - No speaker overlap between sets
36
  - Audio preprocessing:
37
+ - Converted to WAV format, single channel, 16kHz sampling rate, 256 kp/s bitrate
38
+ - Applied SileroVAD for voice activity detection, taking the first voiced segment
 
 
39
 
40
  ## Installation
41
+
42
+ You can install the package directly from GitHub:
43
+
 
 
44
  ```bash
45
+ pip install git+https://github.com/griko/voice-gender-classification.git
46
  ```
47
 
48
  ## Usage
49
 
50
  ```python
51
+ from voice_gender_classification import GenderClassificationPipeline
 
52
 
53
  # Load the pipeline
54
+ classifier = GenderClassificationPipeline.from_pretrained(
55
+ "griko/gender_cls_svm_ecapa_voxceleb"
 
 
56
  )
57
 
58
+ # Single file prediction
59
  result = classifier("path/to/audio.wav")
60
  print(result) # ["female"] or ["male"]
61
+
62
+ # Batch prediction
63
+ results = classifier(["audio1.wav", "audio2.wav"])
64
+ print(results) # ["female", "male", "female"]
65
  ```
66
 
67
  ## Limitations