annotation_app: Annotation app

View source: R/apps.R

annotation_appR Documentation

Annotation app

Description

Starts a shiny app for annotating audio. This is a simplified and faster version of formant_app intended only for making annotations. Use hotkeys (eg spacebar to play/stop) and avoid working with very large files.

Usage

annotation_app(...)

Arguments

...

presets like windowLength = 25. Full list: dynamicRange, specContrast, specBrightness, blur_freq, blur_time, reass_cex, nColors, zp, spec_maxPoints, osc_maxPoints, windowLength, step, spec_xlim, spec_ylim, specType, spec_colorTheme, spec_yScale, osc, wn

Details

Recovering lost data

Every time you add an annotation or move in between files in the queue, the output you've got so far is saved in a temporary backup file. If the app crashes or is closed without saving the results, this backup file preserves your data. To recover it, restart annotation_app() - a dialog box will pop up and ask whether you want to append the old data to the new one. Even so, save your data regularly to be on the safe side!

Value

A list with two elements: $settings (a list of the last used settings) and $annotations (a data.frame with the annotations). Every time a new annotation is added, the app creates a backup csv file in the session's temporary directory, and it returns the final payload upon closing the app.

See Also

formant_app

Examples

## Not run: 
ann = annotation_app()  # runs in default browser such as Firefox or Chrome

ann = annotation_app(specType = 'reassigned', windowLength = 5, step = 1)

# full list of parameters that can be passed to annotation_app():
paste0(c(rownames(soundgen:::def_ann),
 'specType', 'spec_colorTheme', 'spec_yScale', 'osc', 'wn', 'audioMethod'),
 collapse = ', ')

# save the complete output, including the settings used
saveRDS(ann, 'my_annotations.rds')

# re-use the same settings in a future session
ann2 = do.call(annotation_app, ann$settings)

# To change system default browser, run something like:
options('browser' = '/usr/bin/firefox')  # path to the executable on Linux

## End(Not run)

soundgen documentation built on Sept. 20, 2026, 5:07 p.m.