Skip to content

Commit

Permalink
mv the intermediate files to the assets directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Mddct committed Oct 23, 2023
1 parent 852165c commit e8fa013
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ encoder_conf:
kernel_size: 11
sanm_shfit: 0

input_dim: 80
output_dim: 8404
paraformer: true
# decoder related
decoder: SanmDecoder
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,8 @@ def main():
char_dict = {v: k for k, v in symbol_table.items()}
with open(args.config, 'r') as fin:
configs = yaml.load(fin, Loader=yaml.FullLoader)

# mean, istd = load_cmvn(args.cmvn, is_json=True)
# global_cmvn = GlobalCMVN(
# torch.from_numpy(mean).float(),
# torch.from_numpy(istd).float())
# configs['encoder_conf']['input_size'] = 80 * 7
# encoder = SanmEncoder(global_cmvn=global_cmvn, **configs['encoder_conf'])
# configs['decoder_conf']['vocab_size'] = len(char_dict)
# configs['decoder_conf']['encoder_output_size'] = encoder.output_size()
# decoder = SanmDecoer(**configs['decoder_conf'])

# # predictor = PredictorV3(**configs['predictor_conf'])
# predictor = Predictor(**configs['predictor_conf'])
# model = AliParaformer(encoder, decoder, predictor)
configs['cmvn_file'] = args.cmvn
configs['is_json_cmvn'] = True
configs['input_dim'] = 80
configs['output_dim'] = len(char_dict)
model = init_model(configs)
load_checkpoint(model, args.ali_paraformer)
model.eval()
Expand Down
1 change: 0 additions & 1 deletion wenet/utils/init_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def init_model(configs):
if isinstance(encoder, SanmEncoder):
assert isinstance(decoder, SanmDecoer)
# NOTE(Mddct): only support inference for now
print('hello world')
model = AliParaformer(encoder, decoder, predictor)
else:
model = Paraformer(vocab_size=vocab_size,
Expand Down

0 comments on commit e8fa013

Please sign in to comment.