-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalif_otl_run.py
22 lines (19 loc) · 1.07 KB
/
alif_otl_run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
# ASRs=["tencent", "azure", "iflytek", "amazon", "google"]
# commands=["\"Airplane mode on.\"", "\"Call one two three.\"", "\"Cancel my alarm clock.\"", "\"Darn it!\"", "\"I can't take it anymore!\"", "\"I need help.\"", "\"Navigate to my office.\"", "\"Send a message to my mom.\"", "\"Transfer the payment.\"", "\"Turn on the light.\"", "\"Unlock the door.\"", "\"What's the time?\""]
# mels=[("0", "0"), ("1", "1"), ("1", "2"), ("2", "4")]
# alphas= ["0.25", "0.3", "1"]
'''
set the parameters here
Note that "beta" here is different from that in the paper.
"beta" here denotes the index of Mel filterbank.
'''
ASR="tencent"
command="\"What's the time?\""
mel=("1", "1") # (gamma, beta)
alpha="0.3"
rootdir="alif_otl_example/"+ASR+"_alpha"+alpha+"_beta"+mel[1]+"_gamma"+mel[0]
savedir=command.replace(" ", "_").replace(".", "").replace("!", "").replace("?", "").replace("'", "").lower()
cline="python alif_otl.py --text "+command+" --rootdir " +rootdir+ " --savedir "+savedir+" --ASR "+ASR+" --gamma "+mel[0]+" --beta "+mel[1]+" --alpha "+alpha
print(cline)
os.system(cline)