norm_track_wattfab {tidynorm} | R Documentation |
Watt and Fabricius Track normalization
Description
Watt and Fabricius Track normalization
Usage
norm_track_wattfab(
.data,
...,
.token_id_col,
.by = NULL,
.time_col = NULL,
.order = 5,
.return_dct = FALSE,
.drop_orig = FALSE,
.names = "{.formant}_wf",
.silent = FALSE
)
Arguments
.data |
A data frame containing vowel formant data |
... |
|
.token_id_col |
|
.by |
|
.time_col |
|
.order |
The number of DCT parameters to use. |
.return_dct |
Whether or not the normalized DCT coefficients themselves should be returned. |
.drop_orig |
Should the originally targeted columns be dropped. |
.names |
A |
.silent |
Whether or not the informational message should be printed. |
Details
This is a modified version of the Watt & Fabricius Method. The original method identified point vowels over which F1 and F2 centroids were calculated. The procedure here just identifies centroids by taking the mean of all formant values.
\hat{F}_{ij} = \frac{F_{ij}}{S_i}
S_i = \frac{1}{N}\sum_{j=1}^N F_{ij}
Where
-
\hat{F}
is the normalized formant -
i
is the formant number -
j
is the token number
Value
A data frame of Watt & Fabricius normalized formant tracks.
References
Watt, D., & Fabricius, A. (2002). Evaluation of a technique for improving the mapping of multiple speakers’ vowel spaces in the F1 ~ F2 plane. Leeds Working Papers in Linguistics and Phonetics, 9, 159–173.
Examples
library(tidynorm)
library(dplyr)
ggplot2_inst <- require(ggplot2)
track_subset <- speaker_tracks |>
filter(
.by = c(speaker, id),
if_all(
F1:F3,
.fns = \(x) mean(is.finite(x)) > 0.9
),
row_number() %% 2 == 1
)
track_norm <- track_subset |>
norm_track_wattfab(
F1:F3,
.by = speaker,
.token_id_col = id,
.time_col = t,
.drop_orig = TRUE
)
if (ggplot2_inst) {
track_norm |>
ggplot(
aes(F2_wf, F1_wf, color = speaker)
) +
stat_density_2d(bins = 4) +
scale_x_reverse() +
scale_y_reverse() +
scale_color_brewer(palette = "Dark2") +
coord_fixed()
}
# returning the DCT coefficients
track_norm_dct <- track_subset |>
norm_track_wattfab(
F1:F3,
.by = speaker,
.token_id_col = id,
.time_col = t,
.drop_orig = TRUE,
.return_dct = TRUE,
.names = "{.formant}_wf"
)
track_norm_means <- track_norm_dct |>
summarise(
.by = c(speaker, vowel, .param),
across(
ends_with("_wf"),
mean
)
) |>
reframe_with_idct(
ends_with("_wf"),
.by = speaker,
.token_id_col = vowel,
.param_col = .param
)
if (ggplot2_inst) {
track_norm_means |>
ggplot(
aes(F2_wf, F1_wf, color = speaker)
) +
geom_path(
aes(
group = interaction(speaker, vowel)
)
) +
scale_x_reverse() +
scale_y_reverse() +
scale_color_brewer(palette = "Dark2") +
coord_fixed()
}