myleslinder commited on
Commit
05bff36
1 Parent(s): 3110f4b

add additional features

Browse files
Files changed (5) hide show
  1. .DS_Store +0 -0
  2. .gitignore +131 -0
  3. Pipfile +17 -0
  4. README.md +22 -7
  5. tess.py +6 -2
.DS_Store DELETED
Binary file (6.15 kB)
 
.gitignore ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Django stuff:
58
+ *.log
59
+ local_settings.py
60
+ db.sqlite3
61
+ db.sqlite3-journal
62
+
63
+ # Flask stuff:
64
+ instance/
65
+ .webassets-cache
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ target/
75
+
76
+ # Jupyter Notebook
77
+ .ipynb_checkpoints
78
+
79
+ # IPython
80
+ profile_default/
81
+ ipython_config.py
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # pipenv
87
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
88
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
89
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
90
+ # install all needed dependencies.
91
+ #Pipfile.lock
92
+
93
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
94
+ __pypackages__/
95
+
96
+ # Celery stuff
97
+ celerybeat-schedule
98
+ celerybeat.pid
99
+
100
+ # SageMath parsed files
101
+ *.sage.py
102
+
103
+ # Environments
104
+ .env
105
+ .venv
106
+ env/
107
+ venv/
108
+ ENV/
109
+ env.bak/
110
+ venv.bak/
111
+
112
+ # Spyder project settings
113
+ .spyderproject
114
+ .spyproject
115
+
116
+ # Rope project settings
117
+ .ropeproject
118
+
119
+ # mkdocs documentation
120
+ /site
121
+
122
+ # mypy
123
+ .mypy_cache/
124
+ .dmypy.json
125
+ dmypy.json
126
+
127
+ # Pyre type checker
128
+ .pyre/
129
+
130
+ # Mac OS
131
+ .DS_Store
Pipfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [[source]]
2
+ url = "https://pypi.org/simple"
3
+ verify_ssl = true
4
+ name = "pypi"
5
+
6
+ [packages]
7
+ datasets = "*"
8
+ soundfile = "*"
9
+ librosa = "*"
10
+
11
+ [dev-packages]
12
+
13
+ [scripts]
14
+ test = "datasets-cli test ./tess.py --save_info --all_configs"
15
+
16
+ [requires]
17
+ python_version = "3.11"
README.md CHANGED
@@ -1,16 +1,16 @@
1
  ---
2
- pretty_name: TESS
3
  annotations_creators:
4
  - expert-generated
5
- license: cc-by-nc-4.0
6
- task_categories:
7
- - audio-classification
8
  language:
9
  - en
 
10
  multilinguality:
11
  - monolingual
12
  size_categories:
13
  - 1K<n<10K
 
 
 
14
  dataset_info:
15
  features:
16
  - name: path
@@ -21,8 +21,12 @@ dataset_info:
21
  sampling_rate: 24400
22
  - name: speaker_id
23
  dtype: string
 
 
24
  - name: text
25
  dtype: string
 
 
26
  - name: label
27
  dtype:
28
  class_label:
@@ -36,17 +40,17 @@ dataset_info:
36
  '6': ps
37
  splits:
38
  - name: train
39
- num_bytes: 946760
40
  num_examples: 2800
41
  download_size: 224036453
42
- dataset_size: 946760
43
  ---
44
 
45
  # Dataset Card for Toronto emotional speech set (TESS)
46
 
47
  ## Dataset Description
48
 
49
- - **Homepage:** https://doi.org/10.5683/SP2/E8H2MF
50
  - **Point of Contact:** Pichora-Fuller, M. Kathleen (University of Toronto Mississauga)
51
 
52
  ### Dataset Summary
@@ -60,6 +64,7 @@ English
60
  ## Dataset Structure
61
 
62
  ### Data Instances
 
63
  ```json
64
  {
65
  'path': '.../.cache/huggingface/datasets/downloads/extracted/.../tess/OAF_back_angry.wav',
@@ -81,6 +86,16 @@ English
81
  }
82
  ```
83
 
 
 
 
 
 
 
 
 
 
 
84
  ## Additional Information
85
 
86
  ### Citation Information
 
1
  ---
 
2
  annotations_creators:
3
  - expert-generated
 
 
 
4
  language:
5
  - en
6
+ license: cc-by-nc-4.0
7
  multilinguality:
8
  - monolingual
9
  size_categories:
10
  - 1K<n<10K
11
+ task_categories:
12
+ - audio-classification
13
+ pretty_name: TESS
14
  dataset_info:
15
  features:
16
  - name: path
 
21
  sampling_rate: 24400
22
  - name: speaker_id
23
  dtype: string
24
+ - name: speaker_age
25
+ dtype: int8
26
  - name: text
27
  dtype: string
28
+ - name: word
29
+ dtype: string
30
  - name: label
31
  dtype:
32
  class_label:
 
40
  '6': ps
41
  splits:
42
  - name: train
43
+ num_bytes: 1027470
44
  num_examples: 2800
45
  download_size: 224036453
46
+ dataset_size: 1027470
47
  ---
48
 
49
  # Dataset Card for Toronto emotional speech set (TESS)
50
 
51
  ## Dataset Description
52
 
53
+ - **Homepage:** <https://doi.org/10.5683/SP2/E8H2MF>
54
  - **Point of Contact:** Pichora-Fuller, M. Kathleen (University of Toronto Mississauga)
55
 
56
  ### Dataset Summary
 
64
  ## Dataset Structure
65
 
66
  ### Data Instances
67
+
68
  ```json
69
  {
70
  'path': '.../.cache/huggingface/datasets/downloads/extracted/.../tess/OAF_back_angry.wav',
 
86
  }
87
  ```
88
 
89
+ ## Usage
90
+
91
+ This repo uses custom code which must be executed to correctly load the dataset. You can, and should, inspect the [loading script](https://huggingface.co/datasets/myleslinder/tess/blob/main/tess.py).
92
+
93
+ ```python
94
+ from datasets import load_dataset
95
+
96
+ dataset = load_dataset("myleslinder/tess", split="train", trust_remote_code=True)
97
+ ```
98
+
99
  ## Additional Information
100
 
101
  ### Citation Information
tess.py CHANGED
@@ -75,7 +75,9 @@ class TessDataset(datasets.GeneratorBasedBuilder):
75
  "path": datasets.Value("string"),
76
  "audio": datasets.Audio(sampling_rate=sampling_rate),
77
  "speaker_id": datasets.Value("string"),
 
78
  "text": datasets.Value("string"),
 
79
  "label": datasets.ClassLabel(names=_CLASS_NAMES),
80
  }
81
  )
@@ -113,9 +115,11 @@ class TessDataset(datasets.GeneratorBasedBuilder):
113
  audio_path = os.path.join(archive_path, _ROOT_DIR, filename)
114
  examples[audio_path] = {
115
  "path": audio_path,
116
- "speakerId": speakerId,
 
 
117
  "word": word,
118
- "class": label,
119
  }
120
 
121
  id_ = 0
 
75
  "path": datasets.Value("string"),
76
  "audio": datasets.Audio(sampling_rate=sampling_rate),
77
  "speaker_id": datasets.Value("string"),
78
+ "speaker_age": datasets.Value("int8"),
79
  "text": datasets.Value("string"),
80
+ "word": datasets.Value("string"),
81
  "label": datasets.ClassLabel(names=_CLASS_NAMES),
82
  }
83
  )
 
115
  audio_path = os.path.join(archive_path, _ROOT_DIR, filename)
116
  examples[audio_path] = {
117
  "path": audio_path,
118
+ "speaker_id": speakerId,
119
+ "speaker_age": 64 if speakerId == "OAF" else 26,
120
+ "text": f"Say the word {word}",
121
  "word": word,
122
+ "label": label,
123
  }
124
 
125
  id_ = 0