TAMA
Frame
- class entrainment_metrics.tama.frame.Frame(start: float, end: float, is_missing: bool, interpausal_units: Optional[List[InterPausalUnit]])
An interval of time inside an audio
…
- start
Start time of the frame.
- Type
float
- end
End time of the frame.
- Type
float
- is_missing
Whether the frame has no IPUs inside. In other words, if the frame is fulled with silence.
- Type
bool
- interpausal_units
The IPUs that fall inside of the frame
- Type
List[InterPausalUnit]
- calculate_feature_value(feature: str, audio_file: Optional[Path] = None, pitch_gender: Optional[str] = None, extractor: Optional[str] = None) float
Return the frame’s value for the feature given
This value is calculated as the duration-weighted mean of the value for the feature of each IPU inside the frame
Cite Interspeech2016
- class entrainment_metrics.tama.frame.MissingFrame(start: float, end: float)
- calculate_feature_value(feature: str, audio_file: Optional[Path] = None, pitch_gender: Optional[str] = None, extractor: Optional[str] = None) float
Return the frame’s value for the feature given
This value is calculated as the duration-weighted mean of the value for the feature of each IPU inside the frame
Cite Interspeech2016
Utils
- entrainment_metrics.tama.utils.get_frames(wav_fname: Path, words_fname: Path) List[Union[Frame, MissingFrame]]
Return a list of Frames given a Path to a .word file and a .wav file
The format of the word file must be: - For each line f’{starting_time} {ending_time} {word}’ Where starting_time and ending_time are floats
- Parameters
wav_fname (Path) – The path to the wav file
words_fname (Path) – The path to the words file
- Returns
The frames from the wav file with the InterPausalUnits from the word file.
- Return type
List[Union[Frame, MissingFrame]]
Entrainment
- entrainment_metrics.tama.entrainment.calculate_sample_correlation(time_series_a: List[float], time_series_b: List[float], lags: int) List[float]
Calculate the correlations between two series as one of them is lagged
Intuitively, it can be interpreted similarly to Pearson’s correlation coeffi- cient between a time-series and a lagged version of another one, which means that its value varies from −1 to 1. Each value returned can be interpreted as an indication of how much a speaker converged (diverged) in a task in terms of the behavior of a/p feature φ to the behavior her partner had h frames before, where h is the number of lags.
- entrainment_metrics.tama.entrainment.calculate_time_series(feature: str, frames: List[Union[Frame, MissingFrame]], audio_file: Optional[Path] = None, extractor: Optional[str] = None, pitch_gender: Optional[str] = None) List[float]
Generate a time series of the frames values for the feature given