Title: | Voice Analytics for Social Scientists |
---|---|
Description: | Simplifies and largely automates practical voice analytics for social science research. This package offers an accessible and easy-to-use interface, including an interactive Shiny app, that simplifies the processing, extraction, analysis, and reporting of voice recording data in the behavioral and social sciences. The package includes batch processing capabilities to read and analyze multiple voice files in parallel, automates the extraction of key vocal features for further analysis, and automatically generates APA formatted reports for typical between-group comparisons in experimental social science research. A more extensive methodological introduction that inspired the development of the 'voiceR' package is provided in Hildebrand et al. 2020 <doi:10.1016/j.jbusres.2020.09.020>. |
Authors: | Francesc Busquet [aut, cre], Christian Hildebrand [aut] |
Maintainer: | Francesc Busquet <[email protected]> |
License: | GPL-2 |
Version: | 0.1.0 |
Built: | 2024-11-13 04:30:58 UTC |
Source: | https://github.com/cran/voiceR |
Automatically analyzes audio files and outputs a data.frame with their main extracted audio features.
autoExtract( path = ".", audioList = list(), filter = NA, fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", parallel = FALSE, recursive = FALSE, preprocess = FALSE, extended = FALSE, ... )
autoExtract( path = ".", audioList = list(), filter = NA, fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", parallel = FALSE, recursive = FALSE, preprocess = FALSE, extended = FALSE, ... )
path |
An optional character string indicating the path to the folder containing the audio files. Default corresponds to the current working directory. (You should only define it if the audios you wish to analyze are not already read in R. Otherwise define the audioList parameter). |
audioList |
An optional list of Wave objects to analyze. |
filter |
An optional character vector indicating IDs, Conditions, Dimensions, or other patterns used to filter for specific audio files. Default corresponds to NA. |
fileType |
A character string indicating the audio file format (wav or mp3). Default corresponds to wav. |
fileNamePattern |
A character string indicating the naming format of the audio files, such as "ID-Condition-Dimension", "Condition_ID_Dimension" or just "ID". Default corresponds to "ID". |
sep |
A non alpha-numeric character that acts as separator between the different naming components. Default corresponds to an underscore. This field can be ignored if the audio file name only contains an ID component. |
parallel |
Logical value indicating whether to use parallelism to extract the different audio characteristics to enhance computational performance. Default corresponds to FALSE. |
recursive |
Logical value indicating whether subdirectories in the specified directory should be included when searching for voice files. Default corresponds to FALSE. |
preprocess |
Logical value indicating whether to preprocess (normalize amplitude and remove background noise) the audio files before extraction and analysis. Default corresponds to FALSE. |
extended |
Logical value indicating whether all features extracted by the soundgen package should be inputted. Default corresponds to FALSE. |
... |
Other options used to control preprocessing behavior. |
The voiceR package requires the audio file names to follow a specific pattern, in which the different components are separated by a non alphanumeric character (e.g., “_”). File name components refer to:
Unique identifier of the speaker or recording.
Experimental condition or other grouping variable.
Additional survey or experiment information (e.g., additional conditions).
Order and presence of the different components is not important, as long as at least one of the aforementioned components is present. Furthermore, non-relevant components can be skipped by specifying “Null” in its position such as: ID_Null_Condition. Valid name patterns are, for example, 876h Interior (ID Condition), Exterior-3543h (Condition-ID), 983b-Exterior-q1 (ID-Condition-Dimension) or 455k (ID). All voice files within one session need to follow the same file naming pattern. Note: the non-alpha numeric separator should also be specified as sep.
A data.frame is created with the following audio features:
Total duration in seconds.
Proportion of unvoiced frames.
Root mean square of the amplitude envelope.
Average subjective loudness in sone.
Average fundamental frequency in Hertz.
Standard deviation of the fundamental frequency in Hertz.
Average Wiener entropy. A value of 0 indicates a pure tone, while a value of 1 indicates white noise.
Average Harmonics-to-Noise Ratio.
ID component of the audio file.
If fileNamePattern and audio names include a Condition, an additional column with the Condition component of the audio file is included.
If fileNamePattern and audio names include a Dimension, an additional column with the Dimension component of the audio file is included.
[soundgen::analyze()], [seewave::duration()], [seewave::rms()], [seewave::env()]
audioData <- autoExtract(audioList = testAudioList, filter = c("5b438f516066ad470d3be72c52005251"))
audioData <- autoExtract(audioList = testAudioList, filter = c("5b438f516066ad470d3be72c52005251"))
Generates a summary report containing the output of autoExtract(), normalityPlots() and comparisonPlots().
autoReport( audioData, savePath = getwd(), includeDimensions = FALSE, avoidNormalCheck = c(), filename = "voiceR_report.html" )
autoReport( audioData, savePath = getwd(), includeDimensions = FALSE, avoidNormalCheck = c(), filename = "voiceR_report.html" )
audioData |
A data.frame generated by autoExtract() function. |
savePath |
Character string indicating the full path to the folder to which we want to save the generated report. By default it is set to the current working directory. |
includeDimensions |
Logical value indicating whether Dimensions should be also included as a factor or not. Default corresponds to FALSE. |
avoidNormalCheck |
Logical vector, indicating if and what variables' distribution were transformed to normal. By default it is set to FALSE for each of the measures. Alternatively, you can set it to TRUE to avoid checking normality for all the measures. |
filename |
Optional character string indicating the file name of the generated report. Default corresponds to "voiceR_report.html". |
html report file, which is saved in the selected path, but returns nothing.
autoReport(testAudioData = testAudioData)
autoReport(testAudioData = testAudioData)
Generates boxplots for each exracted feature. Plots can be split by experimental condition.
comparisonPlots( audioData, by = c(), measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0", "sd_F0", "mean_entropy", "mean_HNR"), normalSig = 0.05, avoidNormalCheck = FALSE )
comparisonPlots( audioData, by = c(), measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0", "sd_F0", "mean_entropy", "mean_HNR"), normalSig = 0.05, avoidNormalCheck = FALSE )
audioData |
A data.frame generated by the autoExtract() function. |
by |
An optional character vector indicating column(s) from which the comparison groups are to be retrieved. |
measures |
An optional character vector indicating the name of the variables to be plotted. |
normalSig |
Set significance level to test for normality assumptions. Default corresponds to "0.05". |
avoidNormalCheck |
Logical value forcing to avoid checking for normality. When defined as TRUE, it is assumed that the data is normally distributed. Default corresponds to FALSE. |
A list containing the generated boxplots.
comparisonPlots(testAudioData, by = "Condition")
comparisonPlots(testAudioData, by = "Condition")
Internal function which creates an empty data.frame in which the different audio files represent rows and the extracted measures represent columns. Several options can be configured such as joining dimensions or separating conditions.
createEmptyDF( path = ".", audioList = list(), fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", measures = c(), jointDimensions = FALSE, separateConditions = TRUE, filter = NA, recursive = FALSE )
createEmptyDF( path = ".", audioList = list(), fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", measures = c(), jointDimensions = FALSE, separateConditions = TRUE, filter = NA, recursive = FALSE )
path |
An optional character string indicating the path to the folder containing the audio files. Default corresponds to current working directory. |
audioList |
Optional list with already loaded Wave objects to analyze. |
fileType |
Character string indicating the file format (wav or mp3) of the audio files. Default corresponds to wav. |
fileNamePattern |
A character string indicating the naming format, such as "ID-Condition-Dimension", "Condition_ID_Dimension" or "ID". Default corresponds to "ID_Condition_Dimension". |
sep |
A non alpha-numeric character that acts as separator between the different naming components. Default corresponds to underscore. This field can be ignored if the audio file names only contain an ID component. |
measures |
A character vector of measures that should appear in the data frame columns. |
jointDimensions |
Logical value indicating whether dimensions should be joint into a single or not. Default corresponds to FALSE. |
separateConditions |
Logical value indicating whether conditions should be separated or not. Default corresponds to TRUE. |
filter |
Optional character vector indicating IDs, Conditions, Dimensions or other name patterns. Default corresponds to NA. |
recursive |
Logical value indicating whether subdirectories should be included when searching for audio files. Default corresponds to FALSE. |
An empty data.frame in which ID's represent rows and dimensions/measures represent columns.
Indicates the presence and order in which components are retrieved from the file name of each recording.
getComponents(fileNames, fileNamePattern = "ID_Condition_Dimension", sep = "_")
getComponents(fileNames, fileNamePattern = "ID_Condition_Dimension", sep = "_")
fileNames |
A character vector of audio file names. |
fileNamePattern |
A character string indicating the naming format of the audio files, such as "ID-Condition-Dimension", "Condition_ID_Dimension" or "ID". Default corresponds to "ID_Condition_Dimension". |
sep |
A non alpha-numeric that acts as separator between the different naming components. Default corresponds to underscore. |
A list, containing a vector of positions for each component and a data.frame containing the values for each component of the audio files.
getComponents(names(testAudioList), fileNamePattern = "ID_Condition_", sep = "_")
getComponents(names(testAudioList), fileNamePattern = "ID_Condition_", sep = "_")
Retrieves the experimental conditions from the file name following a naming pattern in which the various components (IDs, conditions, and dimensions) are separated by a non-alphanumeric character.
getConditions( path = ".", audioList = list(), fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", filter = NULL, recursive = FALSE )
getConditions( path = ".", audioList = list(), fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", filter = NULL, recursive = FALSE )
path |
A character string indicating the path to the folder containing the audio files. Default corresponds to the current working directory. |
audioList |
Optional list with Wave objects to analyze. |
fileType |
Character string indicating the file format (wav or mp3) of the audio files. Default corresponds to wav. |
fileNamePattern |
Character string indicating the naming format of the audio files, such as "ID-Condition-Dimension", "Condition_ID_Dimension" or "ID". Default corresponds to "ID_Condition_Dimension". |
sep |
A non alpha-numeric that acts as separator between the different naming components. Default corresponds to underscore. |
filter |
Optional character vector used to filter for specific audio files. Default corresponds to NULL. |
recursive |
A logical value indicating whether subdirectories should be included when searching for voice files. Default corresponds to FALSE. |
Character vector, which contains all the unique conditions of the voice files extracted from the name pattern of the audio files.
getConditions(audioList = testAudioList, fileNamePattern = "ID_Condition_Dimension", sep = "_")
getConditions(audioList = testAudioList, fileNamePattern = "ID_Condition_Dimension", sep = "_")
Retrieves the unique dimensions from the file name of multiple audio files following a naming pattern in which the various components (IDs, dimensions and, conditions) are separated by a non-alphanumeric character.
getDimensions( path = ".", audioList = list(), fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", filter = NULL, recursive = FALSE )
getDimensions( path = ".", audioList = list(), fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", filter = NULL, recursive = FALSE )
path |
A character string indicating the path to the folder containing the audio files. Default corresponds to the current working directory. |
audioList |
Optional list with Wave objects to analyze. |
fileType |
Character string indicating the file format (wav or mp3) of the audio files. Default corresponds to wav. |
fileNamePattern |
cCharacter string indicating the naming format of the audio files, such as "ID-Condition-Dimension", "Condition_ID_Dimension" or "ID". Default corresponds to "ID_Condition_Dimension". |
sep |
A non alpha-numeric that acts as separator between the different naming components. Default corresponds to underscore. |
filter |
Optional character vector to filter for specific audio files. Default corresponds to NULL. |
recursive |
A logical value indicating whether subdirectories should be included when searching for voice files. Default corresponds to FALSE. |
Character vector, which contains all the unique dimensions of the voice files found in the specified directory.
getDimensions(audioList = testAudioList, fileNamePattern = "ID_Condition_Dimension", sep = "_")
getDimensions(audioList = testAudioList, fileNamePattern = "ID_Condition_Dimension", sep = "_")
Retrieves the unique IDs from the file name of multiple audio files following a naming pattern in which the various components (IDs, dimensions, conditions) are separated by a non-alphanumeric character.
getIds( path = ".", audioList = NULL, fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", filter = NULL, recursive = FALSE )
getIds( path = ".", audioList = NULL, fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", filter = NULL, recursive = FALSE )
path |
A character string indicating the path to the folder containing the audio files. Default corresponds to the current working directory. |
audioList |
Optional list with Wave objects to analyze. |
fileType |
Character string indicating the file format (wav or mp3) of the audio files. Default corresponds to wav. |
fileNamePattern |
Character string indicating the naming format of the audio files, such as "ID-Condition-Dimension", "Condition_ID_Dimension" or "ID". Default corresponds to "ID_Condition_Dimension". |
sep |
A non alpha-numeric that acts as separator between the different naming components. Default corresponds to underscore. |
filter |
Optional character vector used to filter for specific audio files. Default corresponds to NULL. |
recursive |
A logical value indicating whether subdirectories should be included when searching for voice files. Default corresponds to FALSE. |
Character vector, which contains all the unique IDs extracted from the name pattern of the audio files.
getIds(audioList = testAudioList, fileNamePattern = "ID_Condition_Dimension", sep = "_")
getIds(audioList = testAudioList, fileNamePattern = "ID_Condition_Dimension", sep = "_")
Indicates whether and which dimensions are missing for each ID.
MissDimPerId( path = ".", audioList = NULL, ids = c(), fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", recursive = FALSE )
MissDimPerId( path = ".", audioList = NULL, ids = c(), fileType = "wav", fileNamePattern = "ID_Condition_Dimension", sep = "_", recursive = FALSE )
path |
Character string indicating the path to the folder containing the audio files. Default corresponds to the current working directory. |
audioList |
Optional list with Wave objects to analyze. |
ids |
Character vector indicating the IDs of the files. |
fileType |
Character string indicating the file format (wav or mp3) of the audio files. Default corresponds to wav. |
fileNamePattern |
Character string indicating the naming format of the audio files, such as "ID-Condition-Dimension", "Condition_ID_Dimension" or "ID". Default corresponds to "ID_Condition_Dimension". |
sep |
A non alpha-numeric that acts as separator between the different naming components. Default corresponds to underscore. |
recursive |
A logical value indicating whether subdirectories should be included when searching for voice files. Default corresponds to FALSE. |
A data.frame, in which rows represent IDs and columns represent missing vs. present Dimensions.
MissDimPerId(audioList = testAudioList)
MissDimPerId(audioList = testAudioList)
Generates plots showing the normality of the different measures from the data.frame obtained from autoExtract.
normalityPlots( audioData, measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0", "sd_F0", "mean_entropy", "mean_HNR") )
normalityPlots( audioData, measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0", "sd_F0", "mean_entropy", "mean_HNR") )
audioData |
A data.frame generated by autoExtract. |
measures |
An optional character vector indicating the name of the variables to be plotted. |
A list containing the different plots that are generated.
normalityPlots(testAudioData)
normalityPlots(testAudioData)
This function normalizes audio data using the Box-Cox transformation. It takes in a data frame of audio data and a vector of measures to be normalized. Users can choose to normalize by dimensions and/or conditions.
normalizeData( audioData, measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0", "sd_F0", "mean_entropy", "mean_HNR"), includeDimensions = FALSE, includeConditions = FALSE )
normalizeData( audioData, measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0", "sd_F0", "mean_entropy", "mean_HNR"), includeDimensions = FALSE, includeConditions = FALSE )
audioData |
A data.frame generated by the autoExtract() function. |
measures |
A vector of strings specifying the measures to be normalized. Default corresponds to all the measures extracted by autoExtract(). |
includeDimensions |
A logical value indicating whether or not to include dimensions in the normalization process. Default corresponds to FALSE. |
includeConditions |
A logical value indicating whether or not to include conditions in the normalization process. Default corresponds to FALSE. |
A list containing three elements: (1) a data frame of the normalized audio data and (2) a logical vector indicating whether or not each measure was transformed using Box-Cox transformation and (3) the Box-cox constant added to each measure.
normalizeData(testAudioData)
normalizeData(testAudioData)
Automatically preprocesses a list of Wave objects by normalizing their amplitude and removing background noise.
preprocess(audioList, normalizeAmplitude = TRUE, removeNoise = TRUE, ...)
preprocess(audioList, normalizeAmplitude = TRUE, removeNoise = TRUE, ...)
audioList |
A list of Wave objects. |
normalizeAmplitude |
A logical value indicating whether to normalize amplitude. |
removeNoise |
A logical value indicating whether to remove background noise. |
... |
Other options used to control preprocessing behavior. |
A list of (processed) Wave objects.
preprocess(testAudioList)
preprocess(testAudioList)
Loads all audio files in the specified directory and provides the option to filter via ID, conditions, and/or dimensions.
readAudio(path = ".", filter = c(), fileType = "wav", recursive = FALSE)
readAudio(path = ".", filter = c(), fileType = "wav", recursive = FALSE)
path |
Character string indicating the full path to the folder containing the audio files. Default corresponds to the current working directory. |
filter |
Optional character vector, containing patterns, such as IDs or conditions of each audio file. |
fileType |
Character string indicating the file format (wav or mp3) of the audio files. Default corresponds to wav. |
recursive |
A logical value indicating whether subdirectories should be included when searching for voice files. Default corresponds to FALSE. |
Returns a list of Wave objects.
readAudio(system.file("Audios", package = "voiceR"), fileType = "wav", recursive = TRUE)
readAudio(system.file("Audios", package = "voiceR"), fileType = "wav", recursive = TRUE)
Save all objects in a list of Wave
objects as a .wav or .mp3 file in the specified path.
saveAudio(audioList, path = "./Preprocessed/", fileType = "wav")
saveAudio(audioList, path = "./Preprocessed/", fileType = "wav")
audioList |
A list of Wave objects. |
path |
A character string indicating the full path to the folder containing the audio files. Default corresponds to the current working directory. |
fileType |
Character string indicating the file format (wav or mp3) of the audio files. Default corresponds to wav. |
Save objects of a Wave
list as .mp3 or .wav files.
saveAudio(testAudioList, fileType = "wav")
saveAudio(testAudioList, fileType = "wav")
Automatically generates HTML table with results for one-way or two-way ANOVAs.
tableANOVA( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
tableANOVA( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
audioData |
A data.frame generated by the autoExtract() function. |
by |
A character vector indicating the name of the factor(s). |
measure |
Name of the dependent variable. |
nameMeasure |
Optional relabelling of dependent variable for the output table. If no value is provided, the original variable name is used. |
figureNumber |
An integer indicating the figure number to create the title for the table. Default corresponds to 1. |
HTML table showing the ANOVA results in APA formatting style.
tableANOVA(testAudioData, by = c("Condition", "Dimension"), measure = "duration")
tableANOVA(testAudioData, by = c("Condition", "Dimension"), measure = "duration")
Automatically generates HTML table with results for Dunn's test.
tableDunn( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
tableDunn( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
audioData |
A data.frame generated by the autoExtract() function. |
by |
A character vector indicating the name of the factor(s). |
measure |
Name of the dependent variable. |
nameMeasure |
Optional string to rename dependent variable in the output table. If no value is provided, then original variable name is displayed. |
figureNumber |
Integer indicating the figure number, used to create the title for the table. Default corresponds to 1. |
HTML table showing Dunn's test results in APA formatting style.
tableDunn(testAudioData, by = "Condition", measure = "duration")
tableDunn(testAudioData, by = "Condition", measure = "duration")
Automatically generates HTML table with the results of a Kruskal-Wallis test.
tableKruskal( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1, InfoTable = FALSE )
tableKruskal( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1, InfoTable = FALSE )
audioData |
A data.frame generated by the autoExtract() function. |
by |
A character vector indicating the name of the factor(s). |
measure |
Name of the dependent variable. |
nameMeasure |
Optional string to rename dependent variable in the output table. If no value is provided, original variable name is displayed. |
figureNumber |
Integer indicating the figure number, used to create the title for the table. Default corresponds to 1. |
InfoTable |
Logical value indicating the type of table to be reported. If FALSE, a table containing the mean ranks for each group is displayed; if TRUE, a table containing the main results for the Kruskal-Wallis test is displayed. Default corresponds to FALSE. |
HTML table showing Kruskal-Wallis test results in APA formatting style.
tableKruskal(testAudioData, by = "Condition", measure = "duration")
tableKruskal(testAudioData, by = "Condition", measure = "duration")
This function returns a data.frame containing Shapiro Wilk results by conditions (and dimensions if "includeDimensions" is set to TRUE). Likewise, if "HTMLTable" is set to TRUE, it outputs results as an HTML table in APA style.
tableNormality( audioData, measure = "duration", includeDimensions = FALSE, figureNumber = 1, nameMeasure = c(), HTMLTable = FALSE )
tableNormality( audioData, measure = "duration", includeDimensions = FALSE, figureNumber = 1, nameMeasure = c(), HTMLTable = FALSE )
audioData |
A data.frame generated by the autoExtract() function. |
measure |
Name of the dependent variable. Default corresponds to duration. |
includeDimensions |
Logical value indicating if different dimensions should be also included as a factor when testing for normality. Default corresponds to FALSE. |
figureNumber |
Integer indicating the figure number, used to create the title for the table. Default corresponds to 1. |
nameMeasure |
Optional string indicating the name to be displayed for the dependent variable in the output table. If no value is provided, the string used for the measure attribute is displayed. |
HTMLTable |
Logical value indicating if an HTML table should be generated. Default corresponds to FALSE. |
If "HTMLTable" is set to FALSE, this function returns a data.frame with Shapiro-Wilk test results for each condition (if condition column exists) and dimension (if dimension column exists and "includeDimensions" is set to TRUE). Otherwise an HTML table showing test results in APA formatting style is created.
tableNormality(testAudioData, measure = "duration")
tableNormality(testAudioData, measure = "duration")
Automatically generates an HTML table with the results for Scheirer-Ray-Hare test.
tableSchreirer( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
tableSchreirer( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
audioData |
A data.frame generated by the autoExtract() function. |
by |
A character vector indicating the name of the factor(s). |
measure |
Name of the dependent variable. |
nameMeasure |
Optional string to rename the dependent variable in the output table. If no value is provided, the original variable name is displayed. |
figureNumber |
Integer indicating the figure number, used to create the title for the table. Default corresponds to 1. |
HTML table showing Scheirer-Ray-Hare test results in APA formatting style.
tableSchreirer(testAudioData, by = c("Condition", "Dimension"), measure = "duration")
tableSchreirer(testAudioData, by = c("Condition", "Dimension"), measure = "duration")
Automatically generates an HTML table with the results of a simple main effects analysis.
tableSimpleMainEffects( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
tableSimpleMainEffects( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
audioData |
A data.frame generated by the autoExtract() function. |
by |
A character vector indicating the name of the factors. Note: it requires two factors. |
measure |
Name of the dependent variable. |
nameMeasure |
Optional string to rename the dependent variable in the output table. If no value is provided, the original variable name is displayed. |
figureNumber |
Integer indicating the figure number, used to create the title for the table. Default corresponds to 1. |
HTML table showing simple main effects analysis results in APA formatting style.
tableSimpleMainEffects(testAudioData, by = c("Condition", "Dimension"), measure = "duration")
tableSimpleMainEffects(testAudioData, by = c("Condition", "Dimension"), measure = "duration")
Automatically generates HTML table with the main descriptive statistics (mean, standard deviation and number of data points) for each variable of the data set. Descriptive statistics can be conditioned by groups if grouping variables are defined.
tableSummary( audioData, by = c(), measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0", "sd_F0", "mean_entropy", "mean_HNR"), nameMeasures = c(), figureNumber = 1 )
tableSummary( audioData, by = c(), measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0", "sd_F0", "mean_entropy", "mean_HNR"), nameMeasures = c(), figureNumber = 1 )
audioData |
A data.frame generated by the autoExtract() function. |
by |
A character vector indicating the name of the factor(s). |
measures |
A character vector indicating the name of the variables to be included in the table. |
nameMeasures |
Optional character vector indicating the names to be displayed for each of the different measures in the output table. If no value is provided, original variable names are displayed. |
figureNumber |
Integer indicating figure number, used to create the title for the table. Default corresponds to 1. |
HTML file summarizing the main descriptive statistics for each variable, conditioned by group(s) if one or more factors are provided.
tableSummary(testAudioData, by = c("Condition", "Dimension"), measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0"))
tableSummary(testAudioData, by = c("Condition", "Dimension"), measures = c("duration", "voice_breaks_percent", "RMS_env", "mean_loudness", "mean_F0"))
Automatically generates an HTML table with the results of a Tukey HSD test.
tableTukey( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
tableTukey( audioData, by = c(), measure = "duration", nameMeasure = c(), figureNumber = 1 )
audioData |
A data.frame generated by the autoExtract() function. |
by |
A character vector indicating the name of the factor(s). |
measure |
Name of the dependent variable. |
nameMeasure |
Optional string to rename the dependent variable in the output table. If no value is provided, the original variable name is displayed. |
figureNumber |
Integer indicating the figure number, used to create the title for the table. Default corresponds to 1. |
HTML table showing Tukey HSD test results in APA formatting style.
tableTukey(testAudioData, by = "Condition", measure = "duration")
tableTukey(testAudioData, by = "Condition", measure = "duration")
A test audio features data.frame, obtained by using autoExtract() on the extended version of testAudioList, found <a href="https://osf.io/zt5h2/?view_only=348d1d172435449391e8d64547716477">here</a>.
'testAudioData' A data.frame containing 90 observations and 11 variables, which is the result of applying the autoExtract() function to the extended version of the data found on testAudioList. This data.frame contains several voice features for 90 audio files, which correspond to 15 English-speaking participants. Participants first completed a Baseline Voice Task in which they were instructed to read two predefined phrases ((1) Bar: "I go to the bar", (2) Beer: "I drink a beer") aloud in their normal (neutral) voice. Participants were then instructed to read the predefined phrases in either a happy or a sad voice. The experimenter requested each emotion one at a time and in a random sequence to counter-order effects. Participants were then asked to describe their experience of mimicking the stated phrases for each of the specified emotional states. Thus the data contains 6 observations per participant: two observations for the neutral state, two for the happy simulated state, and two for the sad simulated state. Below we also provide information about the columns this data.frame contains:
Participant identifier
refers to the intention or emotional aspect that the speaker is conveying: Happy, or Sad. This component makes reference to the main point that we want to compare in our data; in the voiceR package the main comparison component is called Condition, because it usually refers to experimental conditions.
Phrase participants read: (1) Bar: "I go to the bar"; (2): Beer: "I drink a beer"
Total duration in seconds.
Proportion of unvoiced frames.
Root mean square of the amplitude envelope.
Average subjective loudness in sone.
Average fundamental frequency in Hertz.
Standard deviation of the fundamental frequency in Hertz.
Average Wiener entropy. A value of 0 indicates a pure tone, while a value of 1 indicates white noise.
Average Harmonics-to-Noise Ratio.
data(testAudioData)
data(testAudioData)
An audio list containing recordings for ten English-speaking participants. Interested users can download an extended version of this data set <a href="https://osf.io/zt5h2/?view_only=348d1d172435449391e8d64547716477">here</a> Participants were seated with an experimenter in a sound-isolated room. All voice recordings were collected using a Blue Yeti Microphone. We used Audacity version 2.4.2 to record the audio files and saved all files using a 32-bit WAV format. Participants were instructed to read the phrase "I go to the bar" in either a happy or a sad voice. The experimenter requested each emotion one at a time and in random sequence to counter order effects.
'testAudioList' A list containing 20 Wave objects. Each Wave object has as name its file name. This file name contains three components separated by an underscore:
combination of numbers and letters refers to the participant identifier, i.e., the ID component
refers to the intention or emotional aspect that the speaker is conveying: Happy, or Sad. This component makes reference to the main point that we want to compare in our data; in the voiceR package the main comparison component is called Condition, because it usually refers to experimental conditions.
provides additional information in the voiceR package.
data(testAudioList)
data(testAudioList)
Launches the voiceR Shiny app, providing the opportunity to analyze multiple audio files via a graphical user interface (no-code interface).
voiceRApp()
voiceRApp()
This function launches the voiceR Shiny app.
if(interactive()){ voiceRApp() }
if(interactive()){ voiceRApp() }