SpeakerCollection

SpeakerCollection(self, track_list=[])

A class to represent the vowel system of all speakers in a TextGrid.

Intended usage

It is a subclass of defaultdict, and can be keyed by the (file_name, group_name) tuple.

vowel_measurements = [VowelMeasurement(t) for t in fasttrack_tracks]
speakers = SpeakerCollection(vowel_measurements)

Parameters

Name Type Description Default
track_list list[VowelMeasurement] A list of VowelMeasurements. []

Methods

Name Description
to_param_df This will return a dataframe of the DCT parameters for all speakers.
to_point_df This will return a DataFrame of point measurements
to_tracks_df This will return a data frame of formant

to_param_df

SpeakerCollection.to_param_df(output='log_param')

This will return a dataframe of the DCT parameters for all speakers. If output is passed param, it will be the DCT parameters in the original Hz. If passed log_param, it will be the DCT parameters over log(Hz).

Parameters

Name Type Description Default
output Literal[‘param’, ‘log_param’] Which set of DCT parameters to return. Defaults to “log_param”. 'log_param'

Returns

Type Description
pl.DataFrame A DataFrame of DCT parameters for all speakers.

to_point_df

SpeakerCollection.to_point_df()

This will return a DataFrame of point measurements for all speakers Returns: (pl.DataFrame): A DataFrame of vowel point measurements.

to_tracks_df

SpeakerCollection.to_tracks_df()

This will return a data frame of formant tracks for all speakers.

Returns

Type Description
pl.DataFrame A dataframe of formant tracks for all speakers.