Skip to contents

This function creates an organized folder structure for storing personal audio recordings of species descriptions and generates an HTML guide with the phrases to be recorded. It is designed to be used after running arboretum_data() and arboretum_phrases(), whose stored phrases (full_phrases_* columns) are the ones shown for recording, and before running arboretum_labels() when users want to provide their own audio files instead of relying only on browser text-to-speech.

In addition to the built-in translated languages ("pt", "en", "fr", and "es"), the function can optionally prepare folders for one additional language through add_lang. This is useful when a project needs to include community-based or locally relevant audio, such as recordings in an Indigenous language, even if that language is not yet fully incorporated into the package interface or translation system.

The add_lang argument is intended as a flexible, intermediate solution: it allows users to organize and add personal audio for an extra language while the rest of the website remains in the package-supported interface languages.

Usage

arboretum_audios(
  data_path = NULL,
  printed_lang = c("pt", "en", "fr", "es"),
  add_lang = NULL,
  verbose = TRUE
)

Arguments

data_path

Character string. Path to the input data file (CSV or Excel format) generated by arboretum_data() and completed with phrases by arboretum_phrases().

printed_lang

Character vector. Built-in language(s) to generate folders and phrases for. Accepted values are "pt", "en", "fr", and "es". Default is c("pt", "en", "fr", "es").

add_lang

Character string or NULL. Optional code for one additional language to include in the folder structure for personal recordings, for example "PANARA" or "TUKANO". This argument is intended for cases where users want to add custom community or local-language audio without translating the full package interface. When supplied, one extra recording folder per species is created using that language code.

verbose

Logical. If TRUE, prints progress messages to the console.

Value

Invisibly returns NULL.

Details

The function creates an arboretum_audios/ directory containing one folder per species-language combination. Folder names follow the pattern:


FAMILY_Genus_species_LANG

where LANG is one of PT, EN, FR, ES, or the custom value supplied in add_lang.

It also creates an HTML file named:


arboretum_audios/__personal_audio_recording_guide.html

This guide helps users navigate across species and languages when preparing personal recordings.

Note

add_lang does not create a full translation workflow for the package interface. It only prepares an additional language slot for custom audio recording, and is especially useful in collaborative projects where accessibility in a community language is needed before a complete website translation is available.

Author

Martin Boucknooghe & Domingos Cardoso