Update feature_extraction_gramt_mono.py
Browse files
feature_extraction_gramt_mono.py
CHANGED
|
@@ -8,6 +8,8 @@ from transformers.utils import TensorType
|
|
| 8 |
import torch
|
| 9 |
import torchaudio
|
| 10 |
|
|
|
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
class MonoFeatureExtractor(SequenceFeatureExtractor):
|
|
@@ -102,7 +104,7 @@ class MonoFeatureExtractor(SequenceFeatureExtractor):
|
|
| 102 |
|
| 103 |
def __call__(
|
| 104 |
self,
|
| 105 |
-
raw_speech: Union[np.ndarray,
|
| 106 |
sampling_rate: Optional[int] = None,
|
| 107 |
return_tensors: Optional[Union[str, TensorType]] = None,
|
| 108 |
normalize : bool = True,
|
|
|
|
| 8 |
import torch
|
| 9 |
import torchaudio
|
| 10 |
|
| 11 |
+
from typing import List
|
| 12 |
+
|
| 13 |
|
| 14 |
|
| 15 |
class MonoFeatureExtractor(SequenceFeatureExtractor):
|
|
|
|
| 104 |
|
| 105 |
def __call__(
|
| 106 |
self,
|
| 107 |
+
raw_speech: Union[np.ndarray, List[float], List[np.ndarray], List[List[float]]],
|
| 108 |
sampling_rate: Optional[int] = None,
|
| 109 |
return_tensors: Optional[Union[str, TensorType]] = None,
|
| 110 |
normalize : bool = True,
|