fix(colab): restart runtime
This commit is contained in:
parent
4d133c754f
commit
f012141a85
|
@ -147,6 +147,7 @@ results
|
|||
inference/chunks_temp.json
|
||||
logs
|
||||
hubert/checkpoint_best_legacy_500.pt
|
||||
pretrain/**/*.pt
|
||||
configs/config.json
|
||||
filelists/test.txt
|
||||
filelists/train.txt
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
def download_dict():
|
||||
return {
|
||||
"vec768l12": {
|
||||
"url": "https://ibm.ent.box.com/shared/static/z1wgl1stco8ffooyatzdwsqn2psd9lrr",
|
||||
"output": "./pretrain/checkpoint_best_legacy_500.pt"
|
||||
},
|
||||
"vec256l9": {
|
||||
"url": "https://ibm.ent.box.com/shared/static/z1wgl1stco8ffooyatzdwsqn2psd9lrr",
|
||||
"output": "./pretrain/checkpoint_best_legacy_500.pt"
|
||||
},
|
||||
"hubertsoft": {
|
||||
"url": "https://github.com/bshall/hubert/releases/download/v0.1/hubert-soft-0d54a1f4.pt",
|
||||
"output": "./pretrain/hubert-soft-0d54a1f4.pt"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def get_speech_encoder(config_path="configs/config.json"):
|
||||
import json
|
||||
|
||||
with open(config_path, "r") as f:
|
||||
data = f.read()
|
||||
config = json.loads(data)
|
||||
speech_encoder = config["model"]["speech_encoder"]
|
||||
dict = download_dict()
|
||||
|
||||
return dict[speech_encoder]["url"], dict[speech_encoder]["output"]
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue