def info(filepath): r"""Gets metadata from an audio file without loading the signal. Args: filepath (str): Path to audio file Returns: Tuple[sox_signalinfo_t, sox_encodinginfo_t]: A si (sox_signalinfo_t) signal info as a python object. An ei (sox_encodinginfo_t) encoding info Example >>> si, ei = torchaudio.info('foo.wav') >>> rate, channels, encoding = si.rate, si.channels, ei.encoding """ return _torch_sox.get_info(filepath)
def info(filepath): """Gets metadata from an audio file without loading the signal. Args: filepath (string): path to audio file Returns: tuple(si, ei) - si (sox_signalinfo_t): signal info as a python object - ei (sox_encodinginfo_t): encoding info as a python object Example:: >>> si, ei = torchaudio.info('foo.wav') >>> rate, channels, encoding = si.rate, si.channels, ei.encoding """ return _torch_sox.get_info(filepath)
def info(filepath): """Gets metadata from an audio file without loading the signal. Args: filepath (string): path to audio file Returns: tuple(C, L, sr, precision) - C (int): number of audio channels - L (int): length of each channel in frames (samples / channels) - sr (int): sample rate i.e. samples per second - precision (float): bit precision i.e. 32-bit or 16-bit audio Example:: >>> num_channels, length, sample_rate, precision = torchaudio.info('foo.wav') """ C, L, sr, bp = _torch_sox.get_info(filepath) return C, L, sr, bp
def info(filepath): r"""See torchaudio.info""" import _torch_sox return _torch_sox.get_info(filepath)
def info(filepath: str) -> Tuple[SignalInfo, EncodingInfo]: r"""See torchaudio.info""" import _torch_sox return _torch_sox.get_info(filepath)