Spaces:
Running
Running
vineelpratap
commited on
Commit
•
cbf5820
1
Parent(s):
7d96516
Update zeroshot.py
Browse files- zeroshot.py +6 -6
zeroshot.py
CHANGED
@@ -16,9 +16,9 @@ UROMAN_PL = os.path.join(uroman_dir, "bin", "uroman.pl")
|
|
16 |
|
17 |
ASR_SAMPLING_RATE = 16_000
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
|
23 |
MODEL_ID = "upload/mms_zs"
|
24 |
|
@@ -144,12 +144,12 @@ def process(
|
|
144 |
|
145 |
if wscore_usedefault:
|
146 |
wscore = (
|
147 |
-
|
148 |
if lm_path is not None
|
149 |
-
else
|
150 |
)
|
151 |
if lmscore_usedefault:
|
152 |
-
lmscore =
|
153 |
|
154 |
beam_search_decoder = ctc_decoder(
|
155 |
lexicon=lexicon_file.name,
|
|
|
16 |
|
17 |
ASR_SAMPLING_RATE = 16_000
|
18 |
|
19 |
+
WORD_SCORE_DEFAULT_IF_LM = -0.18
|
20 |
+
WORD_SCORE_DEFAULT_IF_NOLM = -3.5
|
21 |
+
LM_SCORE_DEFAULT = 1.48
|
22 |
|
23 |
MODEL_ID = "upload/mms_zs"
|
24 |
|
|
|
144 |
|
145 |
if wscore_usedefault:
|
146 |
wscore = (
|
147 |
+
WORD_SCORE_DEFAULT_IF_LM
|
148 |
if lm_path is not None
|
149 |
+
else WORD_SCORE_DEFAULT_IF_NOLM
|
150 |
)
|
151 |
if lmscore_usedefault:
|
152 |
+
lmscore = LM_SCORE_DEFAULT if lm_path is not None else 0
|
153 |
|
154 |
beam_search_decoder = ctc_decoder(
|
155 |
lexicon=lexicon_file.name,
|