refactor: args

This commit is contained in:
Dan Chen
2024-03-21 15:20:09 +08:00
parent 49659dcc13
commit 726b926d98
6 changed files with 22 additions and 13 deletions

View File

@ -10,12 +10,13 @@ from ..blackbox.blackbox import Blackbox
class ASR(Blackbox):
def __init__(self, config: any) -> None:
config = read_yaml(config)
def __init__(self, *args, **kwargs) -> None:
config = read_yaml(args[0])
self.paraformer = RapidParaformer(config)
super().__init__(config)
async def processing(self, data: bytes):
async def processing(self, *args, **kwargs):
data = args[0]
results = self.paraformer([BytesIO(data)])
if len(results) == 0:
return None