mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
remove global vars
This commit is contained in:
parent
cec84de3b6
commit
484d9aa560
@ -591,16 +591,6 @@ def inference_modelscope(
|
|||||||
|
|
||||||
return _forward
|
return _forward
|
||||||
|
|
||||||
def set_parameters(language: str = None,
|
|
||||||
sample_rate: Union[int, Dict[Any, int]] = None):
|
|
||||||
if language is not None:
|
|
||||||
global global_asr_language
|
|
||||||
global_asr_language = language
|
|
||||||
if sample_rate is not None:
|
|
||||||
global global_sample_rate
|
|
||||||
global_sample_rate = sample_rate
|
|
||||||
|
|
||||||
|
|
||||||
def get_parser():
|
def get_parser():
|
||||||
parser = config_argparse.ArgumentParser(
|
parser = config_argparse.ArgumentParser(
|
||||||
description="ASR Decoding",
|
description="ASR Decoding",
|
||||||
|
|||||||
@ -455,16 +455,6 @@ def inference(
|
|||||||
return asr_result_list
|
return asr_result_list
|
||||||
|
|
||||||
|
|
||||||
def set_parameters(language: str = None,
|
|
||||||
sample_rate: Union[int, Dict[Any, int]] = None):
|
|
||||||
if language is not None:
|
|
||||||
global global_asr_language
|
|
||||||
global_asr_language = language
|
|
||||||
if sample_rate is not None:
|
|
||||||
global global_sample_rate
|
|
||||||
global_sample_rate = sample_rate
|
|
||||||
|
|
||||||
|
|
||||||
def get_parser():
|
def get_parser():
|
||||||
parser = config_argparse.ArgumentParser(
|
parser = config_argparse.ArgumentParser(
|
||||||
description="ASR Decoding",
|
description="ASR Decoding",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user