soundgen-package: The soundgen package

soundgen-packageR Documentation

The soundgen package

Description

Parametric source-filter synthesis of harmonic-noise signals, such as animal vocalizations and human voice, with control over pitch, formants, noise, amplitude modulation, nonlinear phenomena, and morphing. General signal processing tools for audio analysis and manipulation: pitch tracking, formant and vocal tract length estimation, reassigned and auditory spectrograms, modulation spectra and psychoacoustic roughness, self-similarity and surprisal, audio segmentation, pitch and formant shifting, etc. Includes four interactive web apps for audio synthesis, annotation, formant analysis, and manually correcting pitch contours.

Details

Visualization

  • spectrogram Ordinary (STFT) spectrograms

  • audSpectrogram Auditory spectrograms

  • modulationSpectrum Modulation spectra and roughness (see Anikin 2025)

  • ssm Self-similarity matrices, acoustic novelty (see Anikin 2026)

  • phasegram Nonlinear analysis, phasegrams (see Anikin & Herbst 2025)

Acoustic analysis

  • analyze General-purpose acoustic analysis (extracts nearly everything: spectral descriptives, pitch, formants, loudness, roughness, ...)

  • segment Audio segmentation, analysis of rhythm and temporal structure of sequences

  • getSurprisal Shannon and autocorrelation-based surprisal, Bayesian surprise (see Anikin 2026)

  • estimateVTL, schwa Formant analysis (see Anikin et al. 2024)

Interactive acoustic analysis

  • pitch_app Manually corrected formant measurement

  • formant_app Manually corrected pitch tracking

  • annotation_app Audio annotation

Sound synthesis

  • soundgen The main function for sound and voice synthesis (see Anikin 2019)

  • soundgen_app Interactive version of the soundgen() function

  • morph Morphing of two sounds based on their soundgen code

Sound modification

  • normalizeFolder Peak / RMS etc normalization of recordings

  • timeStretch, shiftPitch, prosody, shiftFormants Selective modification of fundamental frequency, duration, and/or resonance frequency

  • noiseRemoval, compressor, addAM, resample, etc: various audio effects

Vignettes

  • https://cogsci.se/soundgen/spectrograms.html

  • https://cogsci.se/soundgen/sound_generation.html

  • https://cogsci.se/soundgen/acoustic_analysis.html

  • https://cogsci.se/soundgen/matching/matching.html

Author(s)

Maintainer: Andrey Anikin andrey.anikin@cogsci.se

Authors:

References

  • Anikin, A. (2019). Soundgen: an open-source tool for synthesizing nonverbal vocalizations. Behavior Research Methods, 51(2), 778-792.

  • Anikin, A., Barreda, S. & Reby, D. (2024) A practical guide to calculating vocal tract length and scale-invariant formant patterns. Behavior Research Methods 56, 5588–5604.

  • Anikin, A. (2025) Acoustic estimation of voice roughness. Attention, Perception, & Psychophysics 87: 1771–1787.

  • Anikin, A. & Herbst, C.T. (2025) How to analyze and manipulate nonlinear phenomena in voice recordings. Philosophical Transactions B 380: 20240003.

  • Anikin. A. (2026) Measuring surprisal in sound sequences. Behavior Research Methods.

See Also

Useful links:


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