Description Usage Arguments Value References Examples
View source: R/acoustic_distance.R
This function implements an acoustic distance based on Mel-Frequency Cepstral Coefficients, upon which dynamic time warping is used to produce the results, as proposed by Bartelds et al. (2020). With an input of two audio files in the Waveform Audio File Format (i.e. wav), the function will return a distance between the two audios.
1 | acoustic_distance(file1, file2)
|
file1 |
The file to compare, which should be in the Waveform Audio File Format (i.e. wav). |
file2 |
The other audio file to compare against, again as a wav. |
A number, indicating the distance between the two audio files.
Bartelds, M., Richter, C., Liberman, M., and Wieling, M. 2020. A New Acoustic-Based Pronunciation Distance Measure. Frontiers in Artificial Intelligence, 3, May. doi: 10.3389/frai.2020.00039
1 2 3 4 5 6 7 | # Example 1: The acoustic distance between i and e
i_audio <- system.file("extdata", "i.wav", package="dialectR")
e_audio <- system.file("extdata", "e.wav", package="dialectR")
try(acoustic_distance(i_audio, e_audio),
message("Python not available for testing"),
silent = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.