annotations.Momel package¶
Submodules¶
annotations.Momel.anchor module¶
src.annotations.Momel.anchor.py¶
- class annotations.Momel.anchor.Anchor[source]¶
Bases:
object
Data structure to store a selected anchor.
- Author
Brigitte Bigi
- Organization
Laboratoire Parole et Langage, Aix-en-Provence, France
- Contact
- License
GPL, v3
- Copyright
Copyright (C) 2011-2018 Brigitte Bigi
An anchor was initially called a “target”. Daniel Hirst changed the name in 2017.
- An anchor is made of 2 or 3 values:
x: float : the number of the frame ; required
y: float ; the pitch value ; required
p: int ; optional
- property p¶
Return the p value of an anchor.
- property x¶
Return the x value of an anchor.
- property y¶
Return the y value of an anchor.
annotations.Momel.momel module¶
- filename
sppas.src.annotations.Momel.momel.py
- author
Brigitte Bigi
- contact
- summary
Momel algorithm.
https://en.wikipedia.org/wiki/Momel
Different versions of the Momel algorithm have been developed in the LPL in Aix en Provence over the last twenty years and have been used for the phonetic modelling and symbolic coding of the intonation patterns of a number of languages (including English, French, Italian, Catalan, etc).
The last implementation is presented as a Praat plugin. The modelling and coding algorithms have been implemented as a set of Praat scripts, each corresponding to a specific step in the process.
- See:
- Hirst, Daniel. (2007).A Praat plugin for Momel and INTSINT with improved algorithmsfor modelling and coding intonation.Proceedings of the 16th International Congress of Phonetic Sciences.
The quality of the F0 modelling crucially depends on the quality of the F0 detected.
The quadratic spline function used to model the macro-melodic component is defined by a sequence of target points, (couples <s, Hz>) each pair of which is linked by two monotonic parabolic curves with the spline knot occurring (by default) at the midway point between the two targets. The first derivative of the curve thus defined is zero at each target point and the two parabolas have the same value and same derivative at the spline knot. This, in fact, defines the most simple mathematical function for which the curves are both continuous and smooth.
- class annotations.Momel.momel.Momel[source]¶
Bases:
object
Implements Momel.
- Author
Brigitte Bigi
- Organization
Laboratoire Parole et Langage, Aix-en-Provence, France
- Contact
- License
GPL, v3
- Copyright
Copyright (C) 2011-2018 Brigitte Bigi
- annotate(pitch_values)[source]¶
Apply momel from a vector of pitch values, one each 0.01 sec.
- Parameters
pitch_values – (list)
- Returns
list of selected anchors
- borne()[source]¶
borne.
Principes: calcul borne G (D) si 1ere (derniere) cible est ( > (debut_voisement+halo) ) ( < (fin_voisement -halo) ) ce pt de debut(fin) voisement == frontiere cible extremite == ancre regression quadratique sur Hz de [frontiere ancre]
annotations.Momel.momelutil module¶
- filename
sppas.src.annotations.Align.tracksio.py
- author
Brigitte Bigi
- contact
- summary
utilities for momel
- annotations.Momel.momelutil.quicksortcib(ciblist)[source]¶
Implement quicksort (ie “partition-exchange” sort). that makes on average, O(n log n) comparisons to sort n items. This solution benefits from “list comprehensions”, which keeps the syntax concise and easy to read. Quicksort dedicated to a list of Targets.
annotations.Momel.sppasmomel module¶
- filename
sppas.src.annotations.Momel.sppasmomel.py
- author
Brigitte Bigi
- contact
- summary
SPPAS integration of the Momel automatic annotation.
- class annotations.Momel.sppasmomel.sppasMomel(log=None)[source]¶
Bases:
annotations.baseannot.sppasBaseAnnotation
SPPAS integration of Momel.
- __init__(log=None)[source]¶
Create a new sppasMomel instance.
Log is used for a better communication of the annotation process and its results. If None, logs are redirected to the default logging system.
- Parameters
log – (sppasLog) Human-readable logs.
- static anchors_to_tier(anchors)[source]¶
Transform anchors to a sppasTier.
Anchors are stored in frames. It is converted to seconds (a frame is during 10ms).
- Parameters
anchors – (List of Anchor)
- Returns
(sppasTier)
- convert(pitch)[source]¶
Search for momel anchors.
- Parameters
pitch – (list of float) pitch values samples at 10ms
- Returns
sppasTier
- estimate_momel(ipu_pitch, current_time)[source]¶
Estimate momel on an IPU.
- Parameters
ipu_pitch – (list of float) Pitch values of an IPU.
current_time – (float) Time value of the last pitch value
- Returns
(list of Anchor)
- fix_options(options)[source]¶
Fix all options.
Available options are:
lfen1
hzinf
hzsup
maxec
lfen2
seuildiff_x
seuildiff_y
glitch
- Parameters
options – (sppasOption)
- static fix_pitch(input_filename)[source]¶
Load pitch values from a file.
It is supposed that the given file contains a tier with name “Pitch” with a pitch value every 10ms, or a tier with name “PitchTier”.
- Returns
A list of pitch values (one value each 10 ms).
- static get_input_extensions()[source]¶
Extensions that the annotation expects for its input filename.
Module contents¶
- filename
sppas.src.annotations.Momel.__init__.py
- author
Brigitte Bigi
- contact
- summary
Modelling Melodie
- class annotations.Momel.Momel[source]¶
Bases:
object
Implements Momel.
- Author
Brigitte Bigi
- Organization
Laboratoire Parole et Langage, Aix-en-Provence, France
- Contact
- License
GPL, v3
- Copyright
Copyright (C) 2011-2018 Brigitte Bigi
- annotate(pitch_values)[source]¶
Apply momel from a vector of pitch values, one each 0.01 sec.
- Parameters
pitch_values – (list)
- Returns
list of selected anchors
- borne()[source]¶
borne.
Principes: calcul borne G (D) si 1ere (derniere) cible est ( > (debut_voisement+halo) ) ( < (fin_voisement -halo) ) ce pt de debut(fin) voisement == frontiere cible extremite == ancre regression quadratique sur Hz de [frontiere ancre]
- class annotations.Momel.sppasMomel(log=None)[source]¶
Bases:
annotations.baseannot.sppasBaseAnnotation
SPPAS integration of Momel.
- __init__(log=None)[source]¶
Create a new sppasMomel instance.
Log is used for a better communication of the annotation process and its results. If None, logs are redirected to the default logging system.
- Parameters
log – (sppasLog) Human-readable logs.
- static anchors_to_tier(anchors)[source]¶
Transform anchors to a sppasTier.
Anchors are stored in frames. It is converted to seconds (a frame is during 10ms).
- Parameters
anchors – (List of Anchor)
- Returns
(sppasTier)
- convert(pitch)[source]¶
Search for momel anchors.
- Parameters
pitch – (list of float) pitch values samples at 10ms
- Returns
sppasTier
- estimate_momel(ipu_pitch, current_time)[source]¶
Estimate momel on an IPU.
- Parameters
ipu_pitch – (list of float) Pitch values of an IPU.
current_time – (float) Time value of the last pitch value
- Returns
(list of Anchor)
- fix_options(options)[source]¶
Fix all options.
Available options are:
lfen1
hzinf
hzsup
maxec
lfen2
seuildiff_x
seuildiff_y
glitch
- Parameters
options – (sppasOption)
- static fix_pitch(input_filename)[source]¶
Load pitch values from a file.
It is supposed that the given file contains a tier with name “Pitch” with a pitch value every 10ms, or a tier with name “PitchTier”.
- Returns
A list of pitch values (one value each 10 ms).
- static get_input_extensions()[source]¶
Extensions that the annotation expects for its input filename.