sndinfo
- sndfileio.sndinfo(path)[source]
Get info about a soundfile. Returns a
SndInfo
- Parameters:
path (
str
) – the path to a soundfile- Return type:
- Returns:
a
SndInfo
(attributes – samplerate: int, nframes: int, channels: int, encoding: str, fileformat: str, metadata: dict)
Example
>>> from sndfileio import * >>> info = sndinfo("sndfile.wav") >>> print(f"Duration: {info.duration}s, samplerate: {info.samplerate}") Duration: 0.4s, samplerate: 44100