system HF staff commited on
Commit
614a882
1 Parent(s): 8a0a369

Update files from the datasets library (from 1.13.3)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.13.3

Files changed (2) hide show
  1. README.md +9 -1
  2. arabic_speech_corpus.py +2 -0
README.md CHANGED
@@ -76,7 +76,10 @@ An example from the dataset is:
76
  ```
77
  {
78
  'file': '/Users/username/.cache/huggingface/datasets/downloads/extracted/baebe85e2cb67579f6f88e7117a87888c1ace390f4f14cb6c3e585c517ad9db0/arabic-speech-corpus/wav/ARA NORM 0002.wav',
79
- 'orthographic': 'waraj~aHa Alt~aqoriyru Al~a*iy >aEad~ahu maEohadu >aboHaA^i haDabapi Alt~ibiti fiy Alo>akaAdiymiy~api AlS~iyniy~api liloEuluwmi - >ano tasotamir~a darajaAtu AloHaraArapi wamusotawayaAtu Alr~uTuwbapi fiy Alo<irotifaAEi TawaAla ha*aA Aloqarono',
 
 
 
80
  'phonetic': "sil w a r a' jj A H a tt A q r ii0' r u0 ll a * i0 < a E a' dd a h u0 m a' E h a d u0 < a b H aa' ^ i0 h A D A' b a t i0 tt i1' b t i0 f i0 l < a k aa d ii0 m ii0' y a t i0 SS II0 n ii0' y a t i0 l u0 l E u0 l uu0' m i0 sil < a' n t a s t a m i0' rr a d a r a j aa' t u0 l H a r aa' r a t i0 w a m u0 s t a w a y aa' t u0 rr U0 T UU0' b a t i0 f i0 l Ah i0 r t i0 f aa' E i0 T A' w A l a h aa' * a l q A' r n sil",
81
  'text': '\ufeffwaraj~aHa Alt~aqoriyru Al~aTHiy >aEad~ahu maEohadu >aboHaA^i haDabapi Alt~ibiti fiy Alo>akaAdiymiy~api AlS~iyniy~api liloEuluwmi - >ano tasotamir~a darajaAtu AloHaraArapi wamusotawayaAtu Alr~uTuwbapi fiy Alo<irotifaAEi TawaAla haTHaA Aloqarono'
82
  }
@@ -85,8 +88,13 @@ An example from the dataset is:
85
  ### Data Fields
86
 
87
  - file: A path to the downloaded audio file in .wav format.
 
 
 
88
  - text: the transcription of the audio file.
 
89
  - phonetic: the transcription in phonentics format.
 
90
  - orthographic: the transcriptions written in orthographic format.
91
 
92
  ### Data Splits
 
76
  ```
77
  {
78
  'file': '/Users/username/.cache/huggingface/datasets/downloads/extracted/baebe85e2cb67579f6f88e7117a87888c1ace390f4f14cb6c3e585c517ad9db0/arabic-speech-corpus/wav/ARA NORM 0002.wav',
79
+ 'audio': {'path': '/Users/username/.cache/huggingface/datasets/downloads/extracted/baebe85e2cb67579f6f88e7117a87888c1ace390f4f14cb6c3e585c517ad9db0/arabic-speech-corpus/wav/ARA NORM 0002.wav',
80
+ 'array': array([-0.00048828, -0.00018311, -0.00137329, ..., 0.00079346, 0.00091553, 0.00085449], dtype=float32),
81
+ 'sampling_rate': 48000},
82
+ 'orthographic': 'waraj~aHa Alt~aqoriyru Al~a*iy >aEad~ahu maEohadu >aboHaA^i haDabapi Alt~ibiti fiy Alo>akaAdiymiy~api AlS~iyniy~api liloEuluwmi - >ano tasotamir~a darajaAtu AloHaraArapi wamusotawayaAtu Alr~uTuwbapi fiy Alo<irotifaAEi TawaAla ha*aA Aloqarono',
83
  'phonetic': "sil w a r a' jj A H a tt A q r ii0' r u0 ll a * i0 < a E a' dd a h u0 m a' E h a d u0 < a b H aa' ^ i0 h A D A' b a t i0 tt i1' b t i0 f i0 l < a k aa d ii0 m ii0' y a t i0 SS II0 n ii0' y a t i0 l u0 l E u0 l uu0' m i0 sil < a' n t a s t a m i0' rr a d a r a j aa' t u0 l H a r aa' r a t i0 w a m u0 s t a w a y aa' t u0 rr U0 T UU0' b a t i0 f i0 l Ah i0 r t i0 f aa' E i0 T A' w A l a h aa' * a l q A' r n sil",
84
  'text': '\ufeffwaraj~aHa Alt~aqoriyru Al~aTHiy >aEad~ahu maEohadu >aboHaA^i haDabapi Alt~ibiti fiy Alo>akaAdiymiy~api AlS~iyniy~api liloEuluwmi - >ano tasotamir~a darajaAtu AloHaraArapi wamusotawayaAtu Alr~uTuwbapi fiy Alo<irotifaAEi TawaAla haTHaA Aloqarono'
85
  }
 
88
  ### Data Fields
89
 
90
  - file: A path to the downloaded audio file in .wav format.
91
+
92
+ - audio: A dictionary containing the path to the downloaded audio file, the decoded audio array, and the sampling rate. Note that when accessing the audio column: `dataset[0]["audio"]` the audio file is automatically decoded and resampled to `dataset.features["audio"].sampling_rate`. Decoding and resampling of a large number of audio files might take a significant amount of time. Thus it is important to first query the sample index before the `"audio"` column, *i.e.* `dataset[0]["audio"]` should **always** be preferred over `dataset["audio"][0]`.
93
+
94
  - text: the transcription of the audio file.
95
+
96
  - phonetic: the transcription in phonentics format.
97
+
98
  - orthographic: the transcriptions written in orthographic format.
99
 
100
  ### Data Splits
arabic_speech_corpus.py CHANGED
@@ -85,6 +85,7 @@ class ArabicSpeechCorpus(datasets.GeneratorBasedBuilder):
85
  {
86
  "file": datasets.Value("string"),
87
  "text": datasets.Value("string"),
 
88
  "phonetic": datasets.Value("string"),
89
  "orthographic": datasets.Value("string"),
90
  }
@@ -136,6 +137,7 @@ class ArabicSpeechCorpus(datasets.GeneratorBasedBuilder):
136
 
137
  example = {
138
  "file": wav_path,
 
139
  "text": lab_text,
140
  "phonetic": phonetics[wav_name],
141
  "orthographic": orthographics[wav_name],
 
85
  {
86
  "file": datasets.Value("string"),
87
  "text": datasets.Value("string"),
88
+ "audio": datasets.features.Audio(sampling_rate=48_000),
89
  "phonetic": datasets.Value("string"),
90
  "orthographic": datasets.Value("string"),
91
  }
 
137
 
138
  example = {
139
  "file": wav_path,
140
+ "audio": wav_path,
141
  "text": lab_text,
142
  "phonetic": phonetics[wav_name],
143
  "orthographic": orthographics[wav_name],