"tests/models/vscode:/vscode.git/clone" did not exist on "09eb11a1bd6e77833fde7020efc57e6a804e4e8a"
Unverified Commit ca088639 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Add warning for torchaudio <= 0.10 in MCTCTFeatureExtractor (#19203)


Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent be4f2699
......@@ -21,6 +21,7 @@ from typing import List, Optional, Union
import numpy as np
import torch
import torchaudio
from packaging import version
from ...feature_extraction_sequence_utils import SequenceFeatureExtractor
from ...feature_extraction_utils import BatchFeature
......@@ -30,6 +31,13 @@ from ...utils import logging
logger = logging.get_logger(__name__)
parsed_torchaudio_version_base = version.parse(version.parse(torchaudio.__version__).base_version)
if not parsed_torchaudio_version_base >= version.parse("0.10"):
logger.warning(
f"You are using torchaudio=={torchaudio.__version__}, but torchaudio>=0.10.0 is required to use "
"MCTCTFeatureExtractor. This requires torch>=1.10.0. Please upgrade torch and torchaudio."
)
class MCTCTFeatureExtractor(SequenceFeatureExtractor):
r"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment