Spaces:
Build error
Build error
edits to dashboard and article
Browse files- app.py +10 -1
- article.py +1 -1
- data +1 -1
app.py
CHANGED
|
@@ -173,6 +173,12 @@ def save_record(language,text,record,number,age,gender,accent,number_history,cur
|
|
| 173 |
return output_string,next_number_image,number_history,next_number,done_recording,default_record
|
| 174 |
|
| 175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
def show_records():
|
| 177 |
repo.git_pull()
|
| 178 |
REPOSITORY_DATA_DIR = os.path.join(REPOSITORY_DIR,'data')
|
|
@@ -180,7 +186,8 @@ def show_records():
|
|
| 180 |
|
| 181 |
audio_repo = [os.path.join(f,'audio.wav') for f in repo_recordings]
|
| 182 |
audio_repo = [a.replace('data/data/','https://huggingface.co/datasets/chrisjay/crowd-speech-africa/resolve/main/data/') for a in audio_repo]
|
| 183 |
-
metadata_all = [
|
|
|
|
| 184 |
audios_all = audio_repo
|
| 185 |
|
| 186 |
langs=[m['language_name'] for m in metadata_all]
|
|
@@ -267,6 +274,8 @@ __Note:__ You should record all numbers shown till the end. It does not count i
|
|
| 267 |
7. Click ‘Submit’. It will save your record and go to the next number.
|
| 268 |
8. Repeat 4-7
|
| 269 |
9. Leave a ❤ in the Space, if you found it fun.
|
|
|
|
|
|
|
| 270 |
"""
|
| 271 |
|
| 272 |
|
|
|
|
| 173 |
return output_string,next_number_image,number_history,next_number,done_recording,default_record
|
| 174 |
|
| 175 |
|
| 176 |
+
def get_metadata_json(path):
|
| 177 |
+
try:
|
| 178 |
+
return read_json_lines(path)[0]
|
| 179 |
+
except Exception:
|
| 180 |
+
return []
|
| 181 |
+
|
| 182 |
def show_records():
|
| 183 |
repo.git_pull()
|
| 184 |
REPOSITORY_DATA_DIR = os.path.join(REPOSITORY_DIR,'data')
|
|
|
|
| 186 |
|
| 187 |
audio_repo = [os.path.join(f,'audio.wav') for f in repo_recordings]
|
| 188 |
audio_repo = [a.replace('data/data/','https://huggingface.co/datasets/chrisjay/crowd-speech-africa/resolve/main/data/') for a in audio_repo]
|
| 189 |
+
metadata_all = [get_metadata_json(os.path.join(f,'metadata.jsonl')) for f in repo_recordings]
|
| 190 |
+
metadata_all = [m for m in metadata_all if m!=[]]
|
| 191 |
audios_all = audio_repo
|
| 192 |
|
| 193 |
langs=[m['language_name'] for m in metadata_all]
|
|
|
|
| 274 |
7. Click ‘Submit’. It will save your record and go to the next number.
|
| 275 |
8. Repeat 4-7
|
| 276 |
9. Leave a ❤ in the Space, if you found it fun.
|
| 277 |
+
|
| 278 |
+
> Please Note: Record as many as times as possible (minimum of 20 and maximum of 200).
|
| 279 |
"""
|
| 280 |
|
| 281 |
|
article.py
CHANGED
|
@@ -21,7 +21,7 @@ This dataset will boost speech technologies (like speech-to-text, text-to-speech
|
|
| 21 |
|
| 22 |
**About the dataset**
|
| 23 |
|
| 24 |
-
- The data (metadata, text, and audio recording) are uploaded to [a public Hugging Face dataset](https://huggingface.co/datasets/chrisjay/crowd-speech-africa). [
|
| 25 |
- We do not collect your name, address or other sensitive information.
|
| 26 |
- If for some reason you want to remove your entry, please reach out by email.
|
| 27 |
- Your email, if given, is used only to keep track of your progress in order to give the prizes to the top scorers. They are temporarily stored in [this private dataset](https://huggingface.co/datasets/chrisjay/african-digits-recording-sprint-email) and immediately deleted after the sprint.
|
|
|
|
| 21 |
|
| 22 |
**About the dataset**
|
| 23 |
|
| 24 |
+
- The data (metadata, text, and audio recording) are uploaded to [a public Hugging Face dataset](https://huggingface.co/datasets/chrisjay/crowd-speech-africa). For code lovers, [this](https://huggingface.co/spaces/chrisjay/afro-speech/blob/main/app.py#L90-L106) is the part of our code that handles the upload.
|
| 25 |
- We do not collect your name, address or other sensitive information.
|
| 26 |
- If for some reason you want to remove your entry, please reach out by email.
|
| 27 |
- Your email, if given, is used only to keep track of your progress in order to give the prizes to the top scorers. They are temporarily stored in [this private dataset](https://huggingface.co/datasets/chrisjay/african-digits-recording-sprint-email) and immediately deleted after the sprint.
|
data
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
Subproject commit
|
|
|
|
| 1 |
+
Subproject commit 7fa5d2a2751934a30d76f6dbd20b3295766ba39e
|