From 333c11c0a61c780a524d1b3b07793cff0d46a8da Mon Sep 17 00:00:00 2001 From: "bin.xue" Date: Tue, 11 Oct 2022 14:06:07 +0800 Subject: [PATCH] [to #42322933] fix: missing type bytes in InputType.AUDIO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 已经和谦言讨论过,确认可添加 Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10358110 * fix: missing type bytes in InputType.AUDIO --- modelscope/pipeline_inputs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modelscope/pipeline_inputs.py b/modelscope/pipeline_inputs.py index de9814a7..2b14c278 100644 --- a/modelscope/pipeline_inputs.py +++ b/modelscope/pipeline_inputs.py @@ -28,7 +28,7 @@ class InputType(object): INPUT_TYPE = { InputType.IMAGE: (str, np.ndarray, Image.Image), InputType.TEXT: str, - InputType.AUDIO: (str, np.ndarray), + InputType.AUDIO: (str, bytes, np.ndarray), InputType.VIDEO: (str, np.ndarray, cv2.VideoCapture), InputType.BOX: (list, np.ndarray), InputType.DICT: (dict, type(None)),