PaulineDV commited on
Commit
a0d78cf
·
1 Parent(s): 56f5320

naturalness intelligibility context mos

Browse files
app.py CHANGED
@@ -140,30 +140,72 @@ with gr.Blocks() as demo:
140
  )
141
 
142
  with gr.Row():
143
- mos_A = gr.Dropdown(
144
- choices=["None", "1", "2", "3", "4", "5"],
145
- value="None",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  label="MOS Audio A"
147
  )
148
 
149
- context_A = gr.Dropdown(
150
- choices=["None", "1", "2", "3", "4", "5"],
151
- value="None",
152
- label="Context Adequacy for audio A"
 
 
 
153
  )
154
 
155
- mos_B = gr.Dropdown(
156
- choices=["None", "1", "2", "3", "4", "5"],
157
- value="None",
158
- label="MOS Audio B"
 
 
159
  )
160
 
161
- context_B = gr.Dropdown(
162
- choices=["None", "1", "2", "3", "4", "5"],
163
- value="None",
 
 
164
  label="Context Adequacy for audio B"
165
  )
166
 
 
 
 
 
 
 
 
 
 
167
  preferred_audio = gr.Radio(
168
  choices=[
169
  "Audio A",
@@ -226,10 +268,14 @@ with gr.Blocks() as demo:
226
  device_type,
227
  hidden_models,
228
  context_selector,
229
- mos_A,
 
230
  context_A,
231
- mos_B,
 
 
232
  context_B,
 
233
  preferred_audio
234
  ],
235
  outputs=status
 
140
  )
141
 
142
  with gr.Row():
143
+ naturalness_A = gr.Slider(
144
+ minimum=1,
145
+ maximum=5,
146
+ step=1,
147
+ value=3,
148
+ label="Naturalness A"
149
+ )
150
+
151
+ intelligibility_A = gr.Slider(
152
+ minimum=1,
153
+ maximum=5,
154
+ step=1,
155
+ value=3,
156
+ label="Intelligibility A"
157
+ )
158
+
159
+ context_A = gr.Slider(
160
+ minimum=1,
161
+ maximum=5,
162
+ step=1,
163
+ value=3,
164
+ label="Context Adequacy A"
165
+ )
166
+
167
+ mos_A = gr.Slider(
168
+ minimum=1,
169
+ maximum=5,
170
+ step=1,
171
+ value=3,
172
  label="MOS Audio A"
173
  )
174
 
175
+ with gr.Row():
176
+ naturalness_B = gr.Slider(
177
+ minimum=1,
178
+ maximum=5,
179
+ step=1,
180
+ value=3,
181
+ label="Naturalness B"
182
  )
183
 
184
+ intelligibility_B = gr.Slider(
185
+ minimum=1,
186
+ maximum=5,
187
+ step=1,
188
+ value=3,
189
+ label="Intelligibility B"
190
  )
191
 
192
+ context_B = gr.Slider(
193
+ minimum=1,
194
+ maximum=5,
195
+ step=1,
196
+ value=3,
197
  label="Context Adequacy for audio B"
198
  )
199
 
200
+ mos_B = gr.Slider(
201
+ minimum=1,
202
+ maximum=5,
203
+ step=1,
204
+ value=3,
205
+ label="MOS Audio B"
206
+ )
207
+
208
+ with gr.Row():
209
  preferred_audio = gr.Radio(
210
  choices=[
211
  "Audio A",
 
268
  device_type,
269
  hidden_models,
270
  context_selector,
271
+ naturalness_A,
272
+ intelligibility_A,
273
  context_A,
274
+ mos_A,
275
+ naturalness_B,
276
+ intelligibility_B,
277
  context_B,
278
+ mos_B,
279
  preferred_audio
280
  ],
281
  outputs=status
services/__pycache__/annotation_service.cpython-311.pyc CHANGED
Binary files a/services/__pycache__/annotation_service.cpython-311.pyc and b/services/__pycache__/annotation_service.cpython-311.pyc differ
 
services/annotation_service.py CHANGED
@@ -42,10 +42,14 @@ def submit_pair_annotation_hf(
42
  device_type,
43
  hidden_models,
44
  context,
45
- mos_A,
 
46
  context_A,
47
- mos_B,
 
 
48
  context_B,
 
49
  preferred_audio,
50
  ):
51
 
@@ -60,8 +64,10 @@ def submit_pair_annotation_hf(
60
  "device_type": device_type,
61
  "context": context,
62
  "model_name": hidden_models[0],
63
- "score": mos_A,
 
64
  "context_score": context_A,
 
65
  "preferred_audio": preferred_audio,
66
  "comparaison_id": short_id,
67
  "timestamp": datetime.now(UTC).isoformat()
@@ -76,8 +82,10 @@ def submit_pair_annotation_hf(
76
  "device_type": device_type,
77
  "context": context,
78
  "model_name": hidden_models[1],
79
- "score": mos_B,
 
80
  "context_score": context_B,
 
81
  "preferred_audio": preferred_audio,
82
  "comparaison_id": short_id,
83
  "timestamp": datetime.now(UTC).isoformat()
@@ -126,10 +134,14 @@ def submit_pair_annotation(
126
  device_type,
127
  hidden_models,
128
  context,
129
- mos_A,
 
130
  context_A,
131
- mos_B,
 
 
132
  context_B,
 
133
  preferred_audio,
134
  ):
135
  try:
@@ -143,10 +155,14 @@ def submit_pair_annotation(
143
  device_type,
144
  hidden_models,
145
  context,
146
- mos_A,
 
147
  context_A,
148
- mos_B,
 
 
149
  context_B,
 
150
  preferred_audio,
151
  )
152
 
 
42
  device_type,
43
  hidden_models,
44
  context,
45
+ naturalness_A,
46
+ intelligibility_A,
47
  context_A,
48
+ mos_A,
49
+ naturalness_B,
50
+ intelligibility_B,
51
  context_B,
52
+ mos_B,
53
  preferred_audio,
54
  ):
55
 
 
64
  "device_type": device_type,
65
  "context": context,
66
  "model_name": hidden_models[0],
67
+ "naturalness": naturalness_A,
68
+ "intelligibility": intelligibility_A,
69
  "context_score": context_A,
70
+ "mos": mos_A,
71
  "preferred_audio": preferred_audio,
72
  "comparaison_id": short_id,
73
  "timestamp": datetime.now(UTC).isoformat()
 
82
  "device_type": device_type,
83
  "context": context,
84
  "model_name": hidden_models[1],
85
+ "naturalness": naturalness_B,
86
+ "intelligibility": intelligibility_B,
87
  "context_score": context_B,
88
+ "mos": mos_B,
89
  "preferred_audio": preferred_audio,
90
  "comparaison_id": short_id,
91
  "timestamp": datetime.now(UTC).isoformat()
 
134
  device_type,
135
  hidden_models,
136
  context,
137
+ naturalness_A,
138
+ intelligibility_A,
139
  context_A,
140
+ mos_A,
141
+ naturalness_B,
142
+ intelligibility_B,
143
  context_B,
144
+ mos_B,
145
  preferred_audio,
146
  ):
147
  try:
 
155
  device_type,
156
  hidden_models,
157
  context,
158
+ naturalness_A,
159
+ intelligibility_A,
160
  context_A,
161
+ mos_A,
162
+ naturalness_B,
163
+ intelligibility_B,
164
  context_B,
165
+ mos_B,
166
  preferred_audio,
167
  )
168