Skip to content

Commit 0b8ca03

Browse files
wu6u3twhanyunfan
andauthored
[Whisper] Add labels' in the whisper output (mlcommons#2252)
* add numbers into labels add * remove euro, cent...etc --------- Co-authored-by: hanyunfan <[email protected]>
1 parent 0e556f1 commit 0b8ca03

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

speech2text/accuracy_eval.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929

3030
max_duration = float(os.environ.get("MAX_DURATION", "30.0"))
31+
3132
labels = [
3233
" ",
3334
"a",
@@ -56,7 +57,22 @@
5657
"x",
5758
"y",
5859
"z",
59-
"'"]
60+
"'",
61+
"0",
62+
"1",
63+
"2",
64+
"3",
65+
"4",
66+
"5",
67+
"6",
68+
"7",
69+
"8",
70+
"9",
71+
"$",
72+
"%",
73+
"+",
74+
"-"]
75+
6076
dtype_map = {
6177
"int8": 'b',
6278
"int16": 'h',

speech2text/reference_SUT.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,22 @@ def get_start_cores(start_cores="0"):
9090
"x",
9191
"y",
9292
"z",
93-
"'"]
93+
"'",
94+
"0",
95+
"1",
96+
"2",
97+
"3",
98+
"4",
99+
"5",
100+
"6",
101+
"7",
102+
"8",
103+
"9",
104+
"$",
105+
"%",
106+
"+",
107+
"-"]
108+
94109
labels_dict = {}
95110
for i in range(len(labels)):
96111
labels_dict[labels[i]] = i

0 commit comments

Comments
 (0)