Skip to content

Commit 6c9318e

Browse files
committed
fix feature extraction
1 parent 8f23330 commit 6c9318e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/transformers/models/inkling/feature_extraction_inkling.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ...feature_extraction_sequence_utils import SequenceFeatureExtractor
2222
from ...feature_extraction_utils import BatchFeature
2323
from ...utils import PaddingStrategy, TensorType, logging
24+
from ...utils.import_utils import requires
2425

2526

2627
logger = logging.get_logger(__name__)
@@ -33,6 +34,7 @@ def _to_exact_int(value: float, name: str, tolerance: float = 1e-6) -> int:
3334
return int(rounded)
3435

3536

37+
@requires(backends=("torch",))
3638
class InklingFeatureExtractor(SequenceFeatureExtractor):
3739
r"""
3840
Constructs a TML audio feature extractor, which converts raw audio waveforms into log-mel spectrogram

0 commit comments

Comments
 (0)