lizhiyuan
commited on
Commit
·
2a15ac8
1
Parent(s):
de89efa
fix typo
Browse files- processing_megrezo.py +2 -2
processing_megrezo.py
CHANGED
@@ -30,7 +30,7 @@ from transformers.processing_utils import ProcessorMixin
|
|
30 |
|
31 |
from .image_processing_megrezo import MegrezOImageProcessor # noqa: F401
|
32 |
|
33 |
-
AudioInput = Union[str, bytes,
|
34 |
ReturnTensorType = Union[str, TensorType]
|
35 |
|
36 |
|
@@ -388,7 +388,7 @@ class MegrezOProcessor(ProcessorMixin):
|
|
388 |
) -> AudioBatchFeature:
|
389 |
if isinstance(audio_input, list):
|
390 |
inputs = [load_audio(x) for x in audio_input]
|
391 |
-
elif isinstance(audio_input, (str, bytes,
|
392 |
inputs = [load_audio(audio_input)]
|
393 |
else:
|
394 |
raise ValueError("audio_input must be a path or bytes or a list of paths/bytes")
|
|
|
30 |
|
31 |
from .image_processing_megrezo import MegrezOImageProcessor # noqa: F401
|
32 |
|
33 |
+
AudioInput = Union[str, bytes, np.ndarray, List[str], List[bytes], List[np.ndarray]]
|
34 |
ReturnTensorType = Union[str, TensorType]
|
35 |
|
36 |
|
|
|
388 |
) -> AudioBatchFeature:
|
389 |
if isinstance(audio_input, list):
|
390 |
inputs = [load_audio(x) for x in audio_input]
|
391 |
+
elif isinstance(audio_input, (str, bytes, np.ndarray)):
|
392 |
inputs = [load_audio(audio_input)]
|
393 |
else:
|
394 |
raise ValueError("audio_input must be a path or bytes or a list of paths/bytes")
|