medkit.core.audio.span#

Classes:

Span(start, end)

Boundaries of a slice of audio.

class Span(start, end)[source]#

Boundaries of a slice of audio.

Variables
  • start (float) – Starting point in the original audio, in seconds.

  • end (float) – Ending point in the original audio, in seconds.

Create new instance of Span(start, end)

Attributes:

end

Alias for field number 1

length

Length of the span, in seconds

start

Alias for field number 0

Methods:

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

start: float#

Alias for field number 0

end: float#

Alias for field number 1

property length#

Length of the span, in seconds

count(value, /)#

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)#

Return first index of value.

Raises ValueError if the value is not present.