Add dataset card
Browse files
README.md
CHANGED
|
@@ -1,27 +1,80 @@
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Ntkuhn/Mlx Voice Commands
|
| 2 |
+
|
| 3 |
+
## Dataset Description
|
| 4 |
+
|
| 5 |
+
This dataset contains audio commands with voice control labels generated using text-to-speech synthesis.
|
| 6 |
+
|
| 7 |
+
### Dataset Summary
|
| 8 |
+
|
| 9 |
+
- **Total samples**: 2745
|
| 10 |
+
- **Number of classes**: 13
|
| 11 |
+
- **Audio format**: MP3, 16kHz sampling rate
|
| 12 |
+
- **Text-to-speech engine**: Google Text-to-Speech (gTTS)
|
| 13 |
+
|
| 14 |
+
### Class Distribution
|
| 15 |
+
|
| 16 |
+
| Class Label | Count |
|
| 17 |
+
|-------------|--------|
|
| 18 |
+
| <close_browser> | 201 |
|
| 19 |
+
| <google> | 200 |
|
| 20 |
+
| <maximize_window> | 307 |
|
| 21 |
+
| <minimize_window> | 100 |
|
| 22 |
+
| <mute> | 307 |
|
| 23 |
+
| <no_action> | 100 |
|
| 24 |
+
| <open_browser> | 200 |
|
| 25 |
+
| <open_notepad> | 200 |
|
| 26 |
+
| <play_music> | 207 |
|
| 27 |
+
| <stop_music> | 206 |
|
| 28 |
+
| <switch_window> | 100 |
|
| 29 |
+
| <volume_down> | 309 |
|
| 30 |
+
| <volume_up> | 308 |
|
| 31 |
+
|
| 32 |
+
### Dataset Structure
|
| 33 |
+
|
| 34 |
+
#### Data Fields
|
| 35 |
+
|
| 36 |
+
- `audio` (Audio): Audio file containing the spoken command
|
| 37 |
+
- `original_sentence` (string): Original sentence with special tokens
|
| 38 |
+
- `clean_sentence` (string): Clean sentence without special tokens (used for TTS)
|
| 39 |
+
- `class_label` (string): Command class label (e.g., `<volume_up>`, `<volume_down>`)
|
| 40 |
+
- `info` (string): Additional information about the audio generation
|
| 41 |
+
|
| 42 |
+
#### Example
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
{
|
| 46 |
+
'audio': {'path': 'audio_0001_volume_up_16k.mp3', 'array': [...], 'sampling_rate': 16000},
|
| 47 |
+
'original_sentence': 'Please <volume_up> the music',
|
| 48 |
+
'clean_sentence': 'Please the music',
|
| 49 |
+
'class_label': '<volume_up>',
|
| 50 |
+
'info': 'gTTS, 16kHz mp3'
|
| 51 |
+
}
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
### Usage
|
| 55 |
+
|
| 56 |
+
```python
|
| 57 |
+
from datasets import load_dataset
|
| 58 |
+
|
| 59 |
+
# Load the dataset
|
| 60 |
+
dataset = load_dataset("ntkuhn/mlx_voice_commands")
|
| 61 |
+
|
| 62 |
+
# Access audio and labels
|
| 63 |
+
for sample in dataset["train"]:
|
| 64 |
+
audio = sample["audio"]
|
| 65 |
+
label = sample["class_label"]
|
| 66 |
+
clean_text = sample["clean_sentence"]
|
| 67 |
+
print(f"Label: {label}, Text: {clean_text}")
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
### Dataset Creation
|
| 71 |
+
|
| 72 |
+
This dataset was created using the `generate_audio.py` script, which:
|
| 73 |
+
1. Processes command sentences containing special tokens
|
| 74 |
+
2. Removes special tokens to create clean sentences
|
| 75 |
+
3. Generates audio using Google Text-to-Speech (gTTS)
|
| 76 |
+
4. Resamples audio to 16kHz for consistency
|
| 77 |
+
|
| 78 |
+
### Licensing
|
| 79 |
+
|
| 80 |
+
Please refer to the original dataset license and Google's terms of service for gTTS usage.
|