Amirjab21 commited on
Commit
2353b6d
·
verified ·
1 Parent(s): 780942f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +237 -1
README.md CHANGED
@@ -5,4 +5,240 @@ datasets:
5
  - CSTR-Edinburgh/vctk
6
  base_model:
7
  - openai/whisper-small
8
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  - CSTR-Edinburgh/vctk
6
  base_model:
7
  - openai/whisper-small
8
+ ---
9
+ # Model Card for Model ID
10
+
11
+ <!-- Provide a quick summary of what the model is/does. -->
12
+
13
+ This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
14
+
15
+ ## Model Details
16
+
17
+ ### Model Description
18
+
19
+ <!-- Provide a longer summary of what this model is. -->
20
+
21
+
22
+
23
+ - **Developed by:** [More Information Needed]
24
+ - **Funded by [optional]:** [More Information Needed]
25
+ - **Shared by [optional]:** [More Information Needed]
26
+ - **Model type:** [More Information Needed]
27
+ - **Language(s) (NLP):** [More Information Needed]
28
+ - **License:** [More Information Needed]
29
+ - **Finetuned from model [optional]:** [More Information Needed]
30
+
31
+ ### Model Sources [optional]
32
+
33
+ <!-- Provide the basic links for the model. -->
34
+
35
+ - **Repository:** [More Information Needed]
36
+ - **Paper [optional]:** [More Information Needed]
37
+ - **Demo [optional]:** [More Information Needed]
38
+
39
+ ## Uses
40
+
41
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
42
+
43
+ ### Direct Use
44
+
45
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
46
+
47
+ [More Information Needed]
48
+
49
+ ### Downstream Use [optional]
50
+
51
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
52
+
53
+ [More Information Needed]
54
+
55
+ ### Out-of-Scope Use
56
+
57
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
58
+
59
+ [More Information Needed]
60
+
61
+ ## Bias, Risks, and Limitations
62
+
63
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
64
+
65
+ [More Information Needed]
66
+
67
+ ### Recommendations
68
+
69
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
70
+
71
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
72
+
73
+ ## How to Get Started with the Model
74
+
75
+ Use the code below to get started with the model.
76
+ ```
77
+ ID_TO_ACCENT = {
78
+ 0: "Scottish",
79
+ 1: "English",
80
+ 2: "Indian",
81
+ 3: "Irish",
82
+ 4: "Welsh",
83
+ 5: "New Zealand",
84
+ 6: "Australian",
85
+ 7: "South African",
86
+ 8: "Canadian",
87
+ 9: "NorthernIrish",
88
+ 10: "American",
89
+ 11: "South East Asia",
90
+ 12: "Eastern Europe",
91
+ 13: "East Asia",
92
+ 14: "Nordic",
93
+ 15: "France",
94
+ 16: "Southern Europe",
95
+ 17: "Germany",
96
+ 18: "West Indies",
97
+ 19: "Western Africa",
98
+ 20: "South Asia",
99
+ }
100
+
101
+ import soundfile as sf
102
+ import torch
103
+ from scipy import signal
104
+
105
+ audio_array, sr = sf.read(audio_path)
106
+ if audio_array.ndim > 1:
107
+ audio_array = audio_array.mean(axis=1)
108
+ if sr != 16000:
109
+ audio_array = signal.resample(audio_array, int(len(audio_array)*16000/sr))
110
+ input_features = processor(audio_array, sampling_rate=16000, return_tensors="pt").input_features
111
+ output, pooled_embed = model(input_features)
112
+ probabilities = torch.nn.functional.softmax(output, dim=1)
113
+ predictions = torch.argmax(probabilities, dim=1)
114
+ predicted_accent = ID_TO_ACCENT[predictions.item()]
115
+ accent_probabilities = {ID_TO_ACCENT[i]: prob.item() for i, prob in enumerate(probabilities[0])}
116
+
117
+ ```
118
+
119
+ [More Information Needed]
120
+
121
+ ## Training Details
122
+
123
+ ### Training Data
124
+
125
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
126
+
127
+ [More Information Needed]
128
+
129
+ ### Training Procedure
130
+
131
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
132
+
133
+ #### Preprocessing [optional]
134
+
135
+ [More Information Needed]
136
+
137
+
138
+ #### Training Hyperparameters
139
+
140
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
141
+
142
+ #### Speeds, Sizes, Times [optional]
143
+
144
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
145
+
146
+ [More Information Needed]
147
+
148
+ ## Evaluation
149
+
150
+ <!-- This section describes the evaluation protocols and provides the results. -->
151
+
152
+ ### Testing Data, Factors & Metrics
153
+
154
+ #### Testing Data
155
+
156
+ <!-- This should link to a Dataset Card if possible. -->
157
+
158
+ [More Information Needed]
159
+
160
+ #### Factors
161
+
162
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
163
+
164
+ [More Information Needed]
165
+
166
+ #### Metrics
167
+
168
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
169
+
170
+ [More Information Needed]
171
+
172
+ ### Results
173
+
174
+ [More Information Needed]
175
+
176
+ #### Summary
177
+
178
+
179
+
180
+ ## Model Examination [optional]
181
+
182
+ <!-- Relevant interpretability work for the model goes here -->
183
+
184
+ [More Information Needed]
185
+
186
+ ## Environmental Impact
187
+
188
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
189
+
190
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
191
+
192
+ - **Hardware Type:** [More Information Needed]
193
+ - **Hours used:** [More Information Needed]
194
+ - **Cloud Provider:** [More Information Needed]
195
+ - **Compute Region:** [More Information Needed]
196
+ - **Carbon Emitted:** [More Information Needed]
197
+
198
+ ## Technical Specifications [optional]
199
+
200
+ ### Model Architecture and Objective
201
+
202
+ [More Information Needed]
203
+
204
+ ### Compute Infrastructure
205
+
206
+ [More Information Needed]
207
+
208
+ #### Hardware
209
+
210
+ [More Information Needed]
211
+
212
+ #### Software
213
+
214
+ [More Information Needed]
215
+
216
+ ## Citation [optional]
217
+
218
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
219
+
220
+ **BibTeX:**
221
+
222
+ [More Information Needed]
223
+
224
+ **APA:**
225
+
226
+ [More Information Needed]
227
+
228
+ ## Glossary [optional]
229
+
230
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
231
+
232
+ [More Information Needed]
233
+
234
+ ## More Information [optional]
235
+
236
+ [More Information Needed]
237
+
238
+ ## Model Card Authors [optional]
239
+
240
+ [More Information Needed]
241
+
242
+ ## Model Card Contact
243
+
244
+ [More Information Needed]