Base class to predict hand transition moments [D1,D2] and [M1,M2].
A Cued Speech key is defined as follows:
A1 A2 A3 | ---- C ----- | ----- V ---- | | ---- C -------------------- | | -------------------- V -----|
- A1 is the start time value of the first phoneme of the key;
- A3 is the end time value of the second phoneme of the key.
The system aims to predict both the interval [M1,M2], the moments the hand is moving from its previous position to the one of the key, and interval [D1,D2], the moments the fingers are changing from the previous shape to the one of the key.
In this base class, no transition time values are estimated. The returned intervals are [A1,A1] and [A1,A1]. It corresponds to the system presented in (Bratakos et al., 1998): "Appearance of the cue typically began at the frame corresponding to the start of the consonant segment in the acoustic waveform and was maintained until the end of the following vowel segment (for CV combinations) or of the consonant segment (for consonants occurring alone)."
Reference is:
Maroula S. Bratakos, Paul Duchnowski and Louis D. Braida Toward the Automatic Generation of Cued Speech Cued Speech Journal, vol. VI, pp 1-37, 1998.
Example
>>> p = BaseWhenTransitionPredictor()
>>> p.set_key_interval(2.3, 2.8)
>>> p.a1
> 2.3
>>> p.a3
> 2.8
>>> m1, m2 = p.predict_position()
>>> print(m1)
> 2.3
>>> print(m2)
> 2.3
>>> d1, d2 = p.predict_shape()
>>> print(d1)
> 2.3
>>> print(d2)
> 2.3
>>> p.get_static_duration() # a default key duration
> 0.3
All given intervals [A1;A3] are stored until the reset method is invoked. Their average value can be estimated with 'geta1a3avg_duration()' method.
Example
>>> p = BaseWhenTransitionPredictor()
>>> p.set_key_interval(2., 3.) # duration is 1.
>>> p.set_key_interval(3., 5.) # duration is 2.
>>> p.get_a1a3_avg_duration() # average is 1.5
> 1.5
