Spaces:
Running
Running
Commit
•
b67db6b
1
Parent(s):
b5dab78
make style
Browse files- processing_whisper.py +3 -1
processing_whisper.py
CHANGED
@@ -76,7 +76,9 @@ class WhisperPrePostProcessor(WhisperProcessor):
|
|
76 |
if not isinstance(inputs, np.ndarray):
|
77 |
raise ValueError(f"We expect a numpy ndarray as input, got `{type(inputs)}`.")
|
78 |
if len(inputs.shape) != 1:
|
79 |
-
raise ValueError(
|
|
|
|
|
80 |
|
81 |
if stride is not None:
|
82 |
if stride[0] + stride[1] > inputs.shape[0]:
|
|
|
76 |
if not isinstance(inputs, np.ndarray):
|
77 |
raise ValueError(f"We expect a numpy ndarray as input, got `{type(inputs)}`.")
|
78 |
if len(inputs.shape) != 1:
|
79 |
+
raise ValueError(
|
80 |
+
f"We expect a single channel audio input for the Flax Whisper API, got {len(inputs.shape)} channels."
|
81 |
+
)
|
82 |
|
83 |
if stride is not None:
|
84 |
if stride[0] + stride[1] > inputs.shape[0]:
|