VowelMeasurement
VowelMeasurement(self, track, heuristic=Heuristic(), vowel_place_dict=lambda: dict()(), reference_values=ReferenceValues(), only_fasttrack=False)
A class used to represent a vowel measurement.
Intended Usage
Certain properties of a VowelMeasurement
instance are set by its membership within a VowelClass
and that VowelClass
’s membership in a VowelClassCollection
. These memberships are best managed by passing a list of VowelMeasurement
s to SpeakerCollection
.
= [VowelMeasurement(t) for t in fasttrack_tracks]
vowel_measurements = SpeakerCollection(vowel_measurements) speakers
Parameters
Name | Type | Description | Default |
---|---|---|---|
track |
fasttrackpy .CandidateTracks |
A fasttrackpy.CandidateTrracks object | required |
heuristic |
Heuristic | A point measurement Heuristic to use. Defaults to Heuristic(). | Heuristic() |
vowel_place_dict |
dict[Literal[‘front’, ‘back’], re.Pattern] | A dictionary of regexes that match front or back vowels. | lambda: dict()() |
Attributes
Name | Type | Description |
---|---|---|
track | fasttrackpy .CandidateTracks |
an object of CandidateTracks class |
candidates | list | list of candidates for the track |
heuristic | Heuristic | an object of Heuristic class (default is Heuristic()) |
vowel_class | VowelClass | The containing VowelClass object |
formant_array | FormantArray | A FormantArray object |
file_name | str | name of the file of the track |
group | str | TierGroup of the track |
id | str | id of the track |
interval | aligned_textgrid .SequenceInterval |
interval of the track |
label | str | label of the track |
n_formants | int | number of formants in the track |
optimized | int | The number of optimization iterations the vowel measurement has been through. |
winner | OneTrack | fasttrackpy.OneTrack The winning formant track |
winner_index | int | The index of the winning formant track |
cand_param | NDArray [Shape [Param , Formant , Cand ], Float ] |
A array of the candidate DCT parameters. |
cand_maxformant | NDArray [Shape [1, Cand ], Float ] |
An array of the candidate maximum formants. |
cand_error | NDArray [Shape [Cand ], Float ] |
An array of the candidate smoothing error. |
cand_error_logprob_vm | NDArray [Shape [Cand ], Float ] |
Conversion of the smooth error to log probabilities. The candidate with the lowest error = log(1), and the candidate with the largest error = log(0). |
cand_param_(mahal/logprob)_speaker_byvclass | NDArray [Shape [Cand ], Float ] |
The mahalanobis distance (mahal ) or associated log probability (logprob ) for each candidate relative to the VowelClass for this speaker. These are calculated by drawing the relevant mean and covariance matrix from vm.vowel_class |
cand_param_(mahal/logprob)_speaker_global | NDArray [Shape [Cand ], Float ] |
The mahalanobis distance (mahal ) or associated log probability (logprob ) for each candidate relative to all vowel measurements for this speaker. These are calculated by drawing the relevant mean and covariance matrix from vm.vowel_class.vowel_system |
cand_param_(mahal/logprob)_corpus_byvclass | NDArray [Shape [Cand ], Float ] |
The mahalanobis distance (mahal ) or associated log probability (logprob ) for each candidate relative to this vowel class across all speakers. These are calculated by drawing the relevant mean and covariance matrix from vm.vowel_class.vowel_system.corpus |
point_measure | pl .DataFrame |
A polars dataframe of the point measurement for this vowel. |
vm_context | pl .DataFrame |
A polars dataframe of contextual information for the vowel measurement. |
Methods
Name | Description |
---|---|
to_param_df | Return DataFrame of formant DCT parameters. |
to_point_df | Return a DataFrame of point measurements |
to_tracks_df | Return a DataFrame of the formant tracks |
to_param_df
VowelMeasurement.to_param_df(output='log_param')
Return DataFrame of formant DCT parameters.
Returns
Type | Description |
---|---|
pl .DataFrame |
A DataFrame of formant DCT parameters |
to_point_df
VowelMeasurement.to_point_df()
Return a DataFrame of point measurements
Returns
Type | Description |
---|---|
pl .DataFrame |
A DataFrame of vowel point measures. |
to_tracks_df
VowelMeasurement.to_tracks_df()
Return a DataFrame of the formant tracks
Returns
Type | Description |
---|---|
pl .DataFrame |
A dataframe with formant track data. |