Ogg Speex

Read and write Ogg Speex comments.

This module handles Speex files wrapped in an Ogg bitstream. The first Speex stream found is used.

Read more about Ogg Speex at http://www.speex.org/. This module is based on the specification at http://www.speex.org/manual2/node7.html and clarifications after personal communication with Jean-Marc, http://lists.xiph.org/pipermail/speex-dev/2006-July/004676.html.

class mutagen.oggspeex.OggSpeex(filething)

Bases: OggFileType

An Ogg Speex file.

Parameters:

filething (filething) –

info
Type:

OggSpeexInfo

tags
Type:

mutagen._vorbis.VCommentDict

static score(filename, fileobj, header)

Returns a score for how likely the file can be parsed by this type.

Parameters:
  • filename (fspath) – a file path

  • fileobj (fileobj) – a file object open in rb mode. Position is undefined

  • header (bytes) – data of undefined length, starts with the start of the file.

Returns:

negative if definitely not a matching type, otherwise a score,

the bigger the more certain that the file can be loaded.

Return type:

int

class mutagen.oggspeex.OggSpeexInfo

Bases: StreamInfo

Ogg Speex stream information.

length

file length in seconds, as a float

Type:

float

channels

number of channels

Type:

int

bitrate

nominal bitrate in bits per second. The reference encoder does not set the bitrate; in this case, the bitrate will be 0.

Type:

int

pprint()
Returns:

Print stream information

Return type:

text