@ -5,4 +5,4 @@ cfg_path: # [optional]
ckpt_path: # [optional]
decode_method: 'attention_rescoring'
force_yes: True
device: 'gpu:3' # set 'gpu:id' or 'cpu'
device: 'cpu' # set 'gpu:id' or 'cpu'
@ -15,7 +15,7 @@ decode_method:
am_predictor_conf:
enable_mkldnn: True
switch_ir_optim: True
@ -29,4 +29,4 @@ voc_stat:
# OTHERS #
##################################################################
lang: 'zh'
@ -15,7 +15,7 @@ speaker_dict:
spk_id: 0
enable_mkldnn: False
switch_ir_optim: False
@ -30,7 +30,7 @@ voc_params: # the pdiparams file of your vocoder static model (XX.pdipparams)
voc_sample_rate: 24000
voc_predictor_conf:
voc_sample_rate: 24000 #must match the model
@ -53,6 +53,9 @@ class ASREngine(BaseEngine):
self.executor = ASRServerExecutor()
self.config = get_config(config_file)
if self.config.device is None:
paddle.set_device(paddle.get_device())
else:
paddle.set_device(self.config.device)
self.executor._init_from_path(
self.config.model, self.config.lang, self.config.sample_rate,
@ -54,6 +54,9 @@ class TTSEngine(BaseEngine):
try: