spktsagar commited on
Commit
773ce60
1 Parent(s): feb68a3

add new metadata

Browse files
Files changed (2) hide show
  1. README.md +10 -7
  2. openslr-nepali-asr-cleaned.py +2 -0
README.md CHANGED
@@ -12,13 +12,15 @@ dataset_info:
12
  sampling_rate: 16000
13
  - name: transcription
14
  dtype: string
 
 
15
  config_name: all
16
  splits:
17
  - name: train
18
- num_bytes: 40431744
19
  num_examples: 157905
20
- download_size: 5977720839
21
- dataset_size: 40431744
22
  ---
23
 
24
  # Dataset Card for OpenSLR Nepali Large ASR Cleaned
@@ -51,7 +53,7 @@ The data set has been manually quality-checked, but there might still be errors.
51
 
52
  The audio files are sampled at a rate of 16KHz, and leading and trailing silences are trimmed using torchaudio's voice activity detection.
53
 
54
- For your reference following was the function applied on each of the original openslr utterances.
55
  ```python
56
  import torchaudio
57
 
@@ -85,11 +87,11 @@ Nepali
85
  'speaker_id': '09da0',
86
  'utterance': {
87
  'path': '/root/.cache/huggingface/datasets/downloads/extracted/e3cf9a618900289ecfd4a65356633d7438317f71c500cbed122960ab908e1e8a/cleaned/asr_nepali/data/e1/e1c4d414df.flac',
88
- 'array': array([-0.00192261, -0.00204468, -0.00158691, ..., 0.00323486,
89
- 0.00256348, 0.00262451], dtype=float32),
90
  'sampling_rate': 16000
91
  },
92
- 'transcription': '२००५ मा बिते'
 
93
  }
94
  ```
95
 
@@ -102,6 +104,7 @@ Nepali
102
  - array: numpy array of the utterance
103
  - sampling_rate: sample rate of the utterance
104
  - transcription: Nepali text which spoken in the utterance
 
105
 
106
  ### Data Splits
107
 
 
12
  sampling_rate: 16000
13
  - name: transcription
14
  dtype: string
15
+ - name: num_frames
16
+ dtype: int32
17
  config_name: all
18
  splits:
19
  - name: train
20
+ num_bytes: 41063364
21
  num_examples: 157905
22
+ download_size: 5978669282
23
+ dataset_size: 41063364
24
  ---
25
 
26
  # Dataset Card for OpenSLR Nepali Large ASR Cleaned
 
53
 
54
  The audio files are sampled at a rate of 16KHz, and leading and trailing silences are trimmed using torchaudio's voice activity detection.
55
 
56
+ For your reference, following was the function applied on each of the original openslr utterances.
57
  ```python
58
  import torchaudio
59
 
 
87
  'speaker_id': '09da0',
88
  'utterance': {
89
  'path': '/root/.cache/huggingface/datasets/downloads/extracted/e3cf9a618900289ecfd4a65356633d7438317f71c500cbed122960ab908e1e8a/cleaned/asr_nepali/data/e1/e1c4d414df.flac',
90
+ 'array': array([-0.00192261, -0.00204468, -0.00158691, ..., 0.00323486, 0.00256348, 0.00262451], dtype=float32),
 
91
  'sampling_rate': 16000
92
  },
93
+ 'transcription': '२००५ मा बिते',
94
+ 'num_frames': 42300
95
  }
96
  ```
97
 
 
104
  - array: numpy array of the utterance
105
  - sampling_rate: sample rate of the utterance
106
  - transcription: Nepali text which spoken in the utterance
107
+ - num_frames: length of waveform array
108
 
109
  ### Data Splits
110
 
openslr-nepali-asr-cleaned.py CHANGED
@@ -80,6 +80,7 @@ class OpenslrNepaliAsrCleaned(datasets.GeneratorBasedBuilder):
80
  "speaker_id": datasets.Value("string"),
81
  "utterance": datasets.Audio(sampling_rate=16000),
82
  "transcription": datasets.Value("string"),
 
83
  }
84
  )
85
  return datasets.DatasetInfo(
@@ -124,4 +125,5 @@ class OpenslrNepaliAsrCleaned(datasets.GeneratorBasedBuilder):
124
  "speaker_id": row['speaker_id'],
125
  "utterance": path,
126
  "transcription": row['transcription'],
 
127
  }
 
80
  "speaker_id": datasets.Value("string"),
81
  "utterance": datasets.Audio(sampling_rate=16000),
82
  "transcription": datasets.Value("string"),
83
+ "num_frames": datasets.Value(dtype='int32'),
84
  }
85
  )
86
  return datasets.DatasetInfo(
 
125
  "speaker_id": row['speaker_id'],
126
  "utterance": path,
127
  "transcription": row['transcription'],
128
+ "num_frames": int(row['num_frames']),
129
  }