acoustic_distance: Acoustic distance based on Mel-Frequency Cepstral...

Description Usage Arguments Value References Examples

View source: R/acoustic_distance.R

Description

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.

Usage

1
acoustic_distance(file1, file2)

Arguments

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.

Value

A number, indicating the distance between the two audio files.

References

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

Examples

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)

dialectR documentation built on May 20, 2021, 9:06 a.m.