SndInfo
- class sndfileio.SndInfo(samplerate, nframes, channels, encoding, fileformat, metadata=None, extrainfo=None, bitrate=None)[source]
Bases:
object
A structure to hold information about a soundfile
- samplerate
the samplerate of the soundfile
- nframes
the number of frames
- channels
the number of channels per frame
- encoding
a string describing the encoding of the data.
- fileformat
the format of the soundfile (“wav”, “aif”, “flac”, “mp3”) This is usually the same as the extension of the soundfile read
- metadata
any metadata set in the file. Metadata, if present, is presented in the form of a dict[str, str], where keys are restricted to a subset of possible values: ‘comment’, ‘title’, ‘artist’, ‘album’, ‘tracknumber’
- bitrate
compression bitrate, only present when reading compressed files (mp3, ogg)
Attributes Summary
The duration of the soundfile, in seconds
Attributes Documentation
- duration
The duration of the soundfile, in seconds