Upload 7 files
Browse files- all_audio.tar.gz +3 -0
- dataset_info.json +25 -0
- metadata.csv +40 -0
- misophoniaSounds.py +71 -0
- test_prompts.csv +18 -0
- train_prompts.csv +23 -0
all_audio.tar.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:023c101c97e1deb7663974dacbe394ba5330a607bf41cbd6c7405e90ffc826c7
|
3 |
+
size 45778491
|
dataset_info.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"misophoniaSounds": {
|
3 |
+
"description": "Dataset for misophonia inducing sound detection",
|
4 |
+
"citation": "",
|
5 |
+
"homepage": "https://huggingface.co/datasets/mskov/misophoniaSounds",
|
6 |
+
"license": "cc",
|
7 |
+
"features": {
|
8 |
+
"audio": {
|
9 |
+
"sampling_rate": 16000,
|
10 |
+
"id": null,
|
11 |
+
"_type": "Audio"
|
12 |
+
}
|
13 |
+
},
|
14 |
+
|
15 |
+
"splits": {
|
16 |
+
"train": {
|
17 |
+
"name": "train"
|
18 |
+
},
|
19 |
+
"test": {
|
20 |
+
"name": "test"
|
21 |
+
}
|
22 |
+
|
23 |
+
}
|
24 |
+
}
|
25 |
+
}
|
metadata.csv
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
file_name,transcription
|
2 |
+
data/train/breathing/breathing_112555__nickrave__breathing-mouth.aiff,[breathing]
|
3 |
+
data/train/breathing/breathing_112556__nickrave__breathingwomnose.aiff,[breathing]
|
4 |
+
data/train/breathing/breathing_151206__owlstorm__female-breathing-heavily.wav,[breathing]
|
5 |
+
data/train/breathing/breathing_245948__sophiehall3535__nasal-breathing.wav,[breathing]
|
6 |
+
data/train/breathing/breathing_265040__therisingorder__normal-soft-breathing.aiff,[breathing]
|
7 |
+
data/train/chewing/chew_237310__nmarciniegasm__masticado.wav,[chewing]
|
8 |
+
data/train/chewing/chew_241951__dspena__chewing-cookies.wav,[chewing]
|
9 |
+
data/train/chewing/chew_257704__vmgraw__candy-bar-chewing.wav,[chewing]
|
10 |
+
data/train/chewing/chew_331395__inspectorj__biting-crunchy-a.wav,[chewing]
|
11 |
+
data/train/chewing/chew_368129__drummerman__chewing.wav,[chewing]
|
12 |
+
data/train/cough/cough_n83.wav,[coughing]
|
13 |
+
data/train/cough/cough_n84.wav,[coughing]
|
14 |
+
data/train/mouth/mouth_50943__qubodup__sticky-mouth-sounds.flac,[mouth_sounds]
|
15 |
+
data/train/mouth/mouth_190010__aiwha__mouth.wav,[mouth_sounds]
|
16 |
+
data/train/mouth/mouth_385784__tetri5__mlem.wav,[mouth_sounds]
|
17 |
+
data/train/smack_pop/sp_168152__ultradust__lip-smacking.wav,[lip_smack]
|
18 |
+
data/train/smack_pop/sp_207266__kovi722__sound_produced_by_mouth.wav,[lip_smack]
|
19 |
+
data/train/smack_pop/sp_242113__scratchnsniff__pop-or-bloop.wav,[lip_smack]
|
20 |
+
data/train/smack_pop/sp_317848__benniknop__bubbles-pop-mouth-lips-smack.wav,[lip_smack]
|
21 |
+
data/train/sniffling/sniff_157163__steveoshore__man-sniffling.mp3,[sniffling]
|
22 |
+
data/train/sniffling/sniff_196395__scottemoil__sniffing_sounds.wav,[sniffling]
|
23 |
+
data/train/yawn/yaw_n91.wav,[yawn]
|
24 |
+
data/test/breathing/breathing_353289__jzazvurek__nose-breathing.wav,[breathing]
|
25 |
+
data/test/breathing/breathing_486092__christyboy100__breathing.m4a,[breathing]
|
26 |
+
data/test/breathing/breathing_556523__sofieholmark__breathing.wav,[breathing]
|
27 |
+
data/test/breathing/breathing_676298__saha213131__breath.wav,[breathing]
|
28 |
+
data/test/chewing/chew_412068__inspectorj__chewing-carrot-a.wav,[chewing]
|
29 |
+
data/test/chewing/chew_467623__luthien22__chew-4.wav,[chewing]
|
30 |
+
data/test/chewing/chew_501695__tsakanemashaba__chewing-apricot.wav,[chewing]
|
31 |
+
data/test/chewing/chew_548367__borgory__chewing-crunch-cornflakes.wav,[chewing]
|
32 |
+
data/test/cough/cough_n85.wav,[coughing]
|
33 |
+
data/test/mouth/mouth_543095__riaan3ignite__weird-mouth-sounds.wav,[mouth_sounds]
|
34 |
+
data/test/mouth/mouth_629022__kolombooo__mouth-click.ogg,[mouth_sounds]
|
35 |
+
data/test/smack_pop/sp_408115__angelicwings__popping-noises.wav,[lip_smack]
|
36 |
+
data/test/smack_pop/sp_484993__greenlinker__simple-pop.wav,[lip_smack]
|
37 |
+
data/test/smack_pop/sp_515919__c-v__mouth-plops.wav,[lip_smack]
|
38 |
+
data/test/smack_pop/sniffling/sniff_235770__lex777__sniffles_01.wav,[sniffling]
|
39 |
+
data/test/smack_pop/sniffling/sniff_467203__thunderquads__sniffles.wav,[sniffling]
|
40 |
+
data/test/smack_pop/yawn/yawn_n92.wav,[yawn]
|
misophoniaSounds.py
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import re
|
3 |
+
import datasets
|
4 |
+
from datasets import load_dataset, load_dataset_builder
|
5 |
+
from datasets.tasks import AutomaticSpeechRecognition
|
6 |
+
|
7 |
+
_HOMEPAGE = "https://huggingface.co/datasets/mskov/misophoniaSounds"
|
8 |
+
_CITATION = ""
|
9 |
+
_DESCRIPTION = "Dataset for misophonia inducing sound detection"
|
10 |
+
_DATA_URLS = {
|
11 |
+
"https://huggingface.co/datasets/mskov/misophoniaSounds/all_audio.tar.gz"
|
12 |
+
}
|
13 |
+
_PROMPTS_URLS ={
|
14 |
+
#"train": "https://huggingface.co/datasets/mskov/misophoniaSounds/train_prompts.csv",
|
15 |
+
#"test": "https://huggingface.co/datasets/mskov/misophoniaSounds/test_prompts.csv"
|
16 |
+
"train": "train_prompts.csv",
|
17 |
+
"test": "test_prompts.csv"
|
18 |
+
}
|
19 |
+
_NAMES = ["breathing", "chewing", "coughing", "mouth_sounds", "lip_smack", "sniffling", "yawn"]
|
20 |
+
|
21 |
+
class Miso(datasets.GeneratorBasedBuilder):
|
22 |
+
"""Misophonia Audio"""
|
23 |
+
def _info(self):
|
24 |
+
return datasets.DatasetInfo(
|
25 |
+
description=_DESCRIPTION,
|
26 |
+
features=datasets.Features(
|
27 |
+
{
|
28 |
+
"audio": datasets.Audio(sampling_rate=16_000),
|
29 |
+
"transcript": datasets.features.ClassLabel(names=_NAMES),
|
30 |
+
#"transcript": datasets.Value("string"),
|
31 |
+
}
|
32 |
+
),
|
33 |
+
#supervised_keys=("audio"),
|
34 |
+
supervised_keys=None,
|
35 |
+
homepage=_HOMEPAGE,
|
36 |
+
citation=_CITATION,
|
37 |
+
task_templates=[AutomaticSpeechRecognition(audio_column="audio", transcription_column="transcription")],
|
38 |
+
)
|
39 |
+
def _split_generators(self, dl_manager):
|
40 |
+
#data_files = dl_manager.download_and_extract(_DATA_URLS),
|
41 |
+
prompts_paths = dl_manager.download(_PROMPTS_URLS),
|
42 |
+
audio_files = dl_manager.download(_DATA_URLS),
|
43 |
+
return [
|
44 |
+
datasets.SplitGenerator(
|
45 |
+
name=datasets.Split.TRAIN,
|
46 |
+
gen_kwargs={
|
47 |
+
"filepath": prompts_paths["train"],
|
48 |
+
"audio_files": dl_manager.iter_archive(audio_files),
|
49 |
+
},
|
50 |
+
),
|
51 |
+
datasets.SplitGenerator(
|
52 |
+
name=datasets.Split.TEST,
|
53 |
+
gen_kwargs={
|
54 |
+
"filepath": prompts_paths["test"],
|
55 |
+
"audio_files": dl_manager.iter_archive(audio_files),
|
56 |
+
},
|
57 |
+
),
|
58 |
+
]
|
59 |
+
def _generate_examples(self, filepath, audio_files):
|
60 |
+
"""This function returns the examples in the raw (text) form."""
|
61 |
+
idx = 0
|
62 |
+
for filepath, audio in audio_files:
|
63 |
+
#label = filepath.split('/')[-1][:-4]
|
64 |
+
#description = description.replace('_', ' ')
|
65 |
+
label = filepath.split(',')
|
66 |
+
print(label)
|
67 |
+
yield idx, {
|
68 |
+
"audio": {"path": filepath, "bytes": audio.read()},
|
69 |
+
"text": label,
|
70 |
+
}
|
71 |
+
idx += 1
|
test_prompts.csv
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
file_name,transcription
|
2 |
+
breathing_353289__jzazvurek__nose-breathing.wav,[breathing]
|
3 |
+
breathing_486092__christyboy100__breathing.m4a,[breathing]
|
4 |
+
breathing_556523__sofieholmark__breathing.wav,[breathing]
|
5 |
+
breathing_676298__saha213131__breath.wav,[breathing]
|
6 |
+
chew_412068__inspectorj__chewing-carrot-a.wav,[chewing]
|
7 |
+
chew_467623__luthien22__chew-4.wav,[chewing]
|
8 |
+
chew_501695__tsakanemashaba__chewing-apricot.wav,[chewing]
|
9 |
+
chew_548367__borgory__chewing-crunch-cornflakes.wav,[chewing]
|
10 |
+
cough_n85.wav,[coughing]
|
11 |
+
mouth_543095__riaan3ignite__weird-mouth-sounds.wav,[mouth_sounds]
|
12 |
+
mouth_629022__kolombooo__mouth-click.ogg,[mouth_sounds]
|
13 |
+
sp_408115__angelicwings__popping-noises.wav,[lip_smack]
|
14 |
+
sp_484993__greenlinker__simple-pop.wav,[lip_smack]
|
15 |
+
sp_515919__c-v__mouth-plops.wav,[lip_smack]
|
16 |
+
sniff_235770__lex777__sniffles_01.wav,[sniffling]
|
17 |
+
sniff_467203__thunderquads__sniffles.wav,[sniffling]
|
18 |
+
yawn_n92.wav,[yawn]
|
train_prompts.csv
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
file_name,transcription
|
2 |
+
breathing/breathing_112555__nickrave__breathing-mouth.aiff,[breathing]
|
3 |
+
breathing_112556__nickrave__breathingwomnose.aiff,[breathing]
|
4 |
+
breathing_151206__owlstorm__female-breathing-heavily.wav,[breathing]
|
5 |
+
breathing_245948__sophiehall3535__nasal-breathing.wav,[breathing]
|
6 |
+
breathing_265040__therisingorder__normal-soft-breathing.aiff,[breathing]
|
7 |
+
chew_237310__nmarciniegasm__masticado.wav,[chewing]
|
8 |
+
chew_241951__dspena__chewing-cookies.wav,[chewing]
|
9 |
+
chew_257704__vmgraw__candy-bar-chewing.wav,[chewing]
|
10 |
+
chew_331395__inspectorj__biting-crunchy-a.wav,[chewing]
|
11 |
+
chew_368129__drummerman__chewing.wav,[chewing]
|
12 |
+
cough_n83.wav,[coughing]
|
13 |
+
cough_n84.wav,[coughing]
|
14 |
+
mouth_50943__qubodup__sticky-mouth-sounds.flac,[mouth_sounds]
|
15 |
+
mouth_190010__aiwha__mouth.wav,[mouth_sounds]
|
16 |
+
mouth_385784__tetri5__mlem.wav,[mouth_sounds]
|
17 |
+
sp_168152__ultradust__lip-smacking.wav,[lip_smack]
|
18 |
+
sp_207266__kovi722__sound_produced_by_mouth.wav,[lip_smack]
|
19 |
+
sp_242113__scratchnsniff__pop-or-bloop.wav,[lip_smack]
|
20 |
+
sp_317848__benniknop__bubbles-pop-mouth-lips-smack.wav,[lip_smack]
|
21 |
+
sniff_157163__steveoshore__man-sniffling.mp3,[sniffling]
|
22 |
+
sniff_196395__scottemoil__sniffing_sounds.wav,[sniffling]
|
23 |
+
yaw_n91.wav,[yawn]
|