annotations.RMS package

Submodules

annotations.RMS.irms module

filename

sppas.src.annotations.RMS.irms.py

author

Brigitte Bigi

contact

develop@sppas.org

summary

Estimator of RMS values on intervals.

class annotations.RMS.irms.IntervalsRMS(channel=None)[source]

Bases: object

Estimate RMS on intervals of a channel.

__init__(channel=None)[source]

Create a sppasIntervalsRMS instance.

Parameters

channel – (sppasChannel) the input channel

estimate(begin, end)[source]

Estimate RMS values of the given interval.

rms = sqrt(sum(S_i^2)/n)

Parameters
  • begin – (float) Start value, in seconds

  • end – (float) End value, in seconds

get_fmean()[source]

Return the fmean rms value or 0.

get_rms()[source]

Return the global rms value or 0.

get_values()[source]

Return the list of estimated rms values.

set_channel(channel)[source]

Set a channel, then reset all previous results.

Parameters

channel – (sppasChannel)

annotations.RMS.sppasrms module

filename

sppas.src.annotations.RMS.sppasrms.py

author

Brigitte Bigi

contact

develop@sppas.org

summary

SPPAS integration of RMS automatic annotation

class annotations.RMS.sppasrms.sppasRMS(log=None)[source]

Bases: annotations.baseannot.sppasBaseAnnotation

SPPAS integration of the automatic RMS estimator on intervals.

Estimate the root-mean-square of segments, i.e. sqrt(sum(S_i^2)/n). This is a measure of the power in an audio signal.

__init__(log=None)[source]

Create a new sppasRMS instance.

Parameters

log – (sppasLog) Human-readable logs.

estimator(tier)[source]

Estimate RMS on all non-empty intervals.

Parameters

tier – (sppasTier)

fix_options(options)[source]

Fix all options.

Parameters

options – (sppasOption)

static get_input_extensions()[source]

Extensions that the annotation expects for its input filename.

get_input_patterns()[source]

Pattern this annotation expects for its input filename.

get_inputs(input_files)[source]

Return the channel and the tier with ipus.

Parameters

input_files – (list)

Raise

NoTierInputError

Returns

(sppasChannel, sppasTier)

get_output_pattern()[source]

Pattern this annotation uses in an output filename.

run(input_files, output=None)[source]

Run the automatic annotation process on an input.

Input file is a tuple with 2 files: the audio file and the annotation file

Parameters
  • input_files – (list of str) (audio, time-aligned items)

  • output – (str) the output name

Returns

(sppasTranscription)

set_tiername(tier_name)[source]

Fix the tiername option.

Parameters

tier_name – (str)

Module contents

filename

sppas.src.annotations.RMS.__init__.py

author

Brigitte Bigi

contact

develop@sppas.org

summary

Root-Mean-Square estimation.

class annotations.RMS.IntervalsRMS(channel=None)[source]

Bases: object

Estimate RMS on intervals of a channel.

__init__(channel=None)[source]

Create a sppasIntervalsRMS instance.

Parameters

channel – (sppasChannel) the input channel

estimate(begin, end)[source]

Estimate RMS values of the given interval.

rms = sqrt(sum(S_i^2)/n)

Parameters
  • begin – (float) Start value, in seconds

  • end – (float) End value, in seconds

get_fmean()[source]

Return the fmean rms value or 0.

get_rms()[source]

Return the global rms value or 0.

get_values()[source]

Return the list of estimated rms values.

set_channel(channel)[source]

Set a channel, then reset all previous results.

Parameters

channel – (sppasChannel)

class annotations.RMS.sppasRMS(log=None)[source]

Bases: annotations.baseannot.sppasBaseAnnotation

SPPAS integration of the automatic RMS estimator on intervals.

Estimate the root-mean-square of segments, i.e. sqrt(sum(S_i^2)/n). This is a measure of the power in an audio signal.

__init__(log=None)[source]

Create a new sppasRMS instance.

Parameters

log – (sppasLog) Human-readable logs.

estimator(tier)[source]

Estimate RMS on all non-empty intervals.

Parameters

tier – (sppasTier)

fix_options(options)[source]

Fix all options.

Parameters

options – (sppasOption)

static get_input_extensions()[source]

Extensions that the annotation expects for its input filename.

get_input_patterns()[source]

Pattern this annotation expects for its input filename.

get_inputs(input_files)[source]

Return the channel and the tier with ipus.

Parameters

input_files – (list)

Raise

NoTierInputError

Returns

(sppasChannel, sppasTier)

get_output_pattern()[source]

Pattern this annotation uses in an output filename.

run(input_files, output=None)[source]

Run the automatic annotation process on an input.

Input file is a tuple with 2 files: the audio file and the annotation file

Parameters
  • input_files – (list of str) (audio, time-aligned items)

  • output – (str) the output name

Returns

(sppasTranscription)

set_tiername(tier_name)[source]

Fix the tiername option.

Parameters

tier_name – (str)