Package: voicelab
VoiceLabAutomated Reproducible Acoustical AnalysisVoice Lab is an automated voice analysis software. What this software
does is allow you to measure, manipulate, and visualize many voices at
once, without messing with analysis parameters. You can also save all of
your data, analysis parameters, manipulated voices, and full colour
spectrograms and power spectra, with the press of one button.Version 2.0.0LicenseVoiceLab is licensed under the MIT license. See the LICENSE file for more information.Cite VoicelabIf you use VoiceLab in your research, please cite it:Feinberg, D. (2022). VoiceLab: Software for Fully Reproducible Automated Voice Analysis. Proc. Interspeech 2022, 351-355.Feinberg, D. R., & Cook, O. (2020). VoiceLab: Automated Reproducible Acoustic Analysis. PsyArxivInstallation instructions:Install from pip using Python 3.9 (May work on 3.10, will not work on 3.11)python3.9 -m venv venvsource venv/bin/activatepython3 -m pip install voicelabvoicelabTo install on Windows, download the .zip file from the releases page.Unzip the file, navigate to the Voicelab folderrun the voicelab.exe fileIf you want, you can make a shortcut and put that on your desktopTo install on OSX, download the .zip file from the releases page.Unzip the file, and run the VoiceLab appChanges from 1.3.1 to 2.0New FeaturesMeasureAlphahNode measures the alpha ratioIt is a measure of the ratio of low frequency energy to high frequency energyIt's written by me using NumPyPitch-corrected RMS Energy (Voice Sauce) --See bug fixes.Pitch-corrected Equivalent Continuous Sound Level (Leq)New viewport window for LPC spectraBug fixesMajor bugfix affecting all users of Energy in VoiceLab and Voice SauceIn Voice Sauce source code, they report to calculate RMS in the documentation,
but instead calculated Total energy in each pitch-dependent frame.  This means
the Energy value in Voice Sauce that was translated to VoiceLab was not scaled for
wavelength, and therefore not pitch-independent. To fix this I have implemented
and RMS calculation at every frame. You can see the values are much closer to
those given by Praat now, but are different, and that is because of the
pitch-dependent frame length. I've removed the old calculation of mean energy, and
if you are using RMS energy as a single value, that is the RMS of all of the
frames. If for some reason you want the old calculation, it is in all of the
older versions of VoiceLab.If you are concerned, I recommend anyone who has published using this
algorithm, or plans to in Voice Sauce or older versions of  VoiceLab, re-run
their Energy measurements and use the new values. The values will be similar, but they
won't be the same.Fixed spectrograms and spectraYou can now see them in the boxes and you can expand themAPI is no longer supported until further noticeIf you clone the GitHub repo and look in the tests, you can see how to use the API. However, it is not supported at this time.ContactDavid Feinberg:feinberg@mcmaster.caSoftware Development TeamMaintainerDavid Feinberg, PhDPast ContributorsOliver CookEl Khanoussi YassineDocumentationhttps://voice-lab.github.io/VoiceLabVoice LabVoice Lab is written in Python and relies heavily on a package called
parselmouth-praat. parselmouth-praat is a Python package that
essentially turns Praat's source code written in C and C++ into a
Pythonic interface. What that means is that any praat measurement in
this software is using actual Praat source code, so you can trust the
underlying algorithms. Voice Lab figures out all analysis
parameters for you, but you can always use your own, and these are the
same parameters as in Praat, and they do the exact same thing because it
is Praat's source code powering everything. That means if you are a
beginner an expert, or anything in-between, you can use this software to
automate your acoustical analyses.All of the code is open source and available here on our GitHub repository,
so if this manual isn't in-depth enough, and you want to see exactly
what's going on, go for it. It is under the MIT license, so you are
free to do what you like with the software as long as you give us
credit. For more info on that license, see here.Load Voices TabLoad Sound FilePress this button to load sound files. You can load as many files as you
like. At the moment, Voice Lab processes the following file types:wavmp3aiffoggaifcaunistflacRemove Sound FileUse this button to remove the selected sound file(s) from the list.StartPressing this begins analysis. If you want to run the default analysis,
press this button. If you want to select different analyses or adjust
analysis parameters, go to the 'Settings' tab and press the 'Advanced
Settings' button. Only the files selected (in blue) will be analyzed.
By default we will select all files.Settings TabTo choose different analyses, select theUse Advanced Settingscheckbox. From here, you'll be given the option to select
different analyses. You can also change any analysis parameters. If you
do change analysis parameters, make sure you know what you are doing,
and remember that those same analysis parameters will be used on all
voice files that are selected. If you don't alter these parameters, we
determine analysis parameters automatically for you, so they are
tailored for each voice to give the best measurements.Save ResultsSave Results saves two xlsx files. One is the results.xlsx file and one
is the settings.xlsx file. Here you can choose the directory you want to
save the files into. You don't have to click on a file, just go to the
directory and press the button.results.xlsxThe results file saves all of the voice measurements that you made. Each
measurement gets a separate tab in the xlsx file.settings.xlsxThis file saves all of the parameters used in each measurement. Each
measurement gets a separate tab in the xlsx file. This is great if you
want to know what happened. It can also accompany a manuscript or paper
to help others replicate analyses.Measure DurationThis measures the full duration of the sound file. There are no
parameters to adjust.Measure PitchThis measures voice pitch or fundamental frequency. This uses Praat'sSound: To Pitch (ac)..., by default. You can also
use the cross-correlation algorithm:Sound: To Pitch (cc)...{.python
.sourceCode}. For full details on these algorithms, see thepraat
manual pitch page.Measure Pitchreturns the following measurements:Minimum PitchMaximum PitchMean PitchStandard Deviation of PitchPitch FloorPitch CeilingWe use the automated pitch floor and ceiling parameters describedhere.<floor-ceiling>Measure Pitch YinThis is the Yin implementation from Librosa.Measure SubharmonicsThis measures subharmonic pitch and subharmonic to harmonic ratio.
Subharmonic to harmonic ratio and Subharmonic pitch are measures from
Open Sauce (Yu et al., 2019), a Python port of Voice Sauce (Shue et al.,
2011). These measurements do not use any Praat or Parselmouth code. As
in (Shue et al., 2011) and (Yu et al., 2019), subharmonic raw values are
padded with NaN values to 201 data points.Shue, Y.-L., Keating, P., Vicenik, C., & Yu, K. (2011). VoiceSauce: A program for voice analysis. Proceedings of the ICPhS XVII, 1846–1849.Yu, T. M., Murray, R. D., Silverstein, K., & Yu, K. M. (2019). OpenSauce: Open source software for voice analysis, v0.1.https://doi.org/10.5281/zenodo.2638411Automated pitch floor and ceiling parametersPraat suggests adjusting pitch settings based ongender. It's not gender per se that is important, but the pitch of voice. To
mitigate this, VoiceLab first casts a wide net in floor and ceiling
settings to learn the range of probable fundamental frequencies is a
voice. Then it remeasures the voice pitch using different settings for
higher and lower pitched voices. VoiceLab by default uses employsvery accurate. VoiceLab returnsminimum pitch,maximum pitch{.python
.sourceCode},mean pitch, andstandard deviation of pitch. By default VoiceLab
uses autocorrelation forMeasuring Pitch<Pitch>{.interpreted-text
role="ref"}, and cross-correlation forharmonicity<HNR>,Jitter<Jitter>, andShimmer<Shimmer>,Measure HarmonicityThis measures mean harmonics-to-noise-ratio using automatic floor and
ceiling settings describedhere.<floor-ceiling>{.interpreted-text
role="ref"} Full details of the algorithm can be found in thePraat
Manual Harmonicity
Page. By
default Voice Lab useTo Harmonicity (cc)... You
can selectTo Harmonicity (ac)or change any
other Praat parameters if you wish.Measure JitterThis measures and returns values of all ofPraat's jitter
algorithms.
This can be a bit overwhelming or difficult to understand which measure
to use and why, or can lead to multiple colinear comparisons. To address
this, by default, Voice Lab returns a the first component from a
principal components analysis of those jitter algorithms taken across
all selected voices. The underlying reasoning here is that each of these
algorithms measures something about how noisy the voice is due to
perturbations in period length. The PCA finds what is common about all
of these measures of noise, and gives you a score relative to your
sample. With a large enough sample, the PCA score should be a more
robust measure of jitter than any single measurement. Voice Lab uses use
it'sautomated pitch floor and ceiling algorithm.<floor-ceiling>to set analysis parameters.Jitter Measures:Jitter (local)Jitter (local, absolute)Jitter (rap)Jitter (ppq5)Jitter (ddp)Measure ShimmerThis measures and returns values of all ofPraat's shimmer
algorithms.
This can be a bit overwhelming or difficult to understand which measure
to use and why, or can lead to multiple colinear comparisons. To address
this, by default, Voice Lab returns a the first component from a
principal components analysis of those shimmer algorithms taken across
all selected voices. The underlying reasoning here is that each of these
algorithms measures something about how noisy the voice is due to
perturbations in amplitude of periods. The PCA finds what is common
about all of these measures of noise, and gives you a score relative to
your sample. With a large enough sample, the PCA score should be a more
robust measure of shimmer than any single measurement. Voice Lab uses
use it'sautomated pitch floor and ceiling algorithm.<floor-ceiling>to set analysis parameters.Shimmer Measures:Shimmer (local)Shimmer (local, dB)Shimmer (apq3)Shimmer (aqp5)Shimmer (apq11)Shimmer (ddp)Measure Cepstral Peak Prominance (CPP)This measures Cepstral Peak Prominance in Praat. You can adjust
interpolation, qeufrency upper and lower bounds, line type, and fit
method.Measure FormantsThis returns the mean of the first 4 formant frequencies of the voice
using theTo FormantPathalgorithm using 5.5
maximum number of formants. All other values are Praat defaults for
Formant Path. Formant path picks the best formant ceiling value by
fitting each prediction to a polynomial curve, and choosing the best fit
for each formant. You can also use your own settings for :python:'To
Formant Burg...' if you want to.Vocal Tract EstimatesThis returns the following vocal tract length estimates:Average FormantThis calculates the meanof the first
four formant frequencies for each sound.Pisanski, K., & Rendall, D. (2011). The prioritization of voice
fundamental frequency or formants in listeners' assessments of speaker
size, masculinity, and attractiveness. The Journal of the Acoustical
Society of America, 129(4), 2201-2212.Principle Components AnalysisThis returns the first factor from a Principle Components Analysis (PCA)
of the 4 formants.Babel, M., McGuire, G., & King, J. (2014). Towards a more nuanced view
of vocal attractiveness. PloS one, 9(2), e88616.Formant PositionFormant Position is set to only run on samples of 30 or greater because
this measure is based on transforming the data using z-scoring, which is
based on the population mean. Without a large enough sample, this
measurement could be suspicious.Puts, D. A., Apicella, C. L., & Cárdenas, R. A. (2011). Masculine voices
signal men's threat potential in forager and industrial societies.
Proceedings of the Royal Society B: Biological Sciences, 279(1728),
601-609.Geometric MeanThis calculates the geometric meanof the first 4 formant frequencies for each sound.Smith, D. R., & Patterson, R. D. (2005). The interaction of
glottal-pulse rate andvocal-tract length in judgements of speaker size,
sex, and age.Journal of the Acoustical Society of America, 118,
3177e3186.Formant DispersionFitch, W. T. (1997). Vocal-tract length and formant frequency dispersion
correlate with body size in rhesus macaques.Journal of the Acoustical
Society of America,102,1213e1222.VTLFitch, W. T. (1997). Vocal-tract length and formant frequency dispersion
correlate with body size in rhesus macaques.Journal of the Acoustical
Society of America,102,1213e1222.Titze, I. R. (1994).Principles of voice production. Englewood Cliffs,
NJ: Prentice Hall.VTL Δf= The slope of 0 intercept regression between
F_i = \frac{(2i-1)}{2}\Delta f and the mean of each of the first 4 formant
frequencies.Reby,D.,& McComb,K.(2003).Anatomical constraints generate honesty:
acoustic cues to age and weight in the roars of red deer stags. Animal
Behaviour, 65,519e530.Measure IntensityThis returns the mean of Praat'sSound: To Intensity...function in dB. You can adjust the minimum pitch parameter.Measure EnergyThis is my port of VoiceSauce’s Energy Algorithm. It is different than the old RMS Energy algorithm in previous versions of VoiceLab. This code is not in OpenSauce.Measure Speech RateThis function is an implementation of the Praat script published here:
De Jong, N.H. & Wempe, T. (2009). Praat script to detect syllable nuclei
and measure speech rate automatically. Behavior research methods, 41
(2), 385 - 390.Voice Lab used version 2 of the script, available [here
https://sites.google.com/site/speechrate/Home/praat-script-syllable-nuclei-v2]{.title-ref}This returns: - Number of SyllablesNumber of PausesDuratrion(s)Phonation Time(s)Speech Rate (Number of Syllables / Duration)Articulation Rate (Number of Syllables / Phonation Time)Average Syllable Duration (Speaking Time / Number of Syllables)You can adjust: - silence thresholdmindbmimimum dip between peaks (dB)mindip. This
should be between 2-4. Try 4 for clean and filtered sounds, and
lower numbers for noisier sounds.minimum pause lengthminpauseThis command really only words on sounds with a few syllables, since
Voice Lab is measuring how fast someone speaks. For monosyllabic sounds,
use theMeasure Duration function.<Duration>Measure Spectral TiltThis measures spectral tilt by returning the slope of a regression
between freqeuncy and amplitude of each sound. This is from a script
written by Michael J. Owren, with sorting errors corrected. This is not
the same equation in Voice Sauce.Owren, M.J. GSU Praat Tools: Scripts for modifying and analyzing sounds
using Praat acoustics software. Behavior Research Methods (2008) 40:
822--829.https://doi.org/10.3758/BRM.40.3.822Measure LTAS:This measures several items from the Long-Term Average Spectrum using
Praat's default settings.mean (dB)slope (dB)local peak height (dB)standard deviation (dB)spectral tilt slope (dB/Hz)spectral tilt intercept (dB)You can adjust: - Pitch correction - Bandwidth - Max Frequency -
Shortest and longest periods - Maximum period factorMeasure Spectral ShapeThis measures spectral: - Centre of Gravity - Standard Deviation -
Kurtosis - Band Energy Difference - Band Density DifferenceVoice ManipulationsVoice Lab provides several voice manipulations.Manipulate PitchThis manipulates pitch using the PSOLA method. By default Manipulate
Pitch Lower and Manipulate Pitch Higher lower and raise pitch by -/+ 0.5
ERBs (Equivalent Rectangular Bandwidths) which is about -/+ 20 Hz at a
120 Hz pitch centre and about -/+ 25 Hz at a 240 Hz pitch centre. By
default VoiceLab also normalizes intensity to 70 dB RMS, but you can
turn this off by deselecting the box in the Settings tab.Manipulate FormantsThis manipulates formants using Praat's Change Gender Function. By
default, Formants are scaled by +/- 15%. This manipulation resamples a
sound by the Formant scaling factor (which can be altered in the
Settings tab). Then, the sampling rate is overriden to the sound's
original sampling rate. Then PSOLA is employed to stretch time and pitch
back (separately) into their original values.Manipulate Pitch and FormantsThis manipulation raises and lowers both pitch and formants in the same
direction by the same or independent amounts. This uses the algorithm
described in Manipulate Formants, but allows the user to scale or shift
pitch to a designated degree. By default, pitch is also scaled +/- 15%.Resample SoundsThis is a quick and easy way to batch process resampling sounds. 44.1kHz
is the default. Change this value in the Settings tab.Reverse SoundsThis reverses the selected sounds. Use this if you want to play sounds
backwards. Try a Led Zepplin or Beatles song.Rotate SpectrumThis resamples the sound, rotates the selected sounds by 180 degrees and reverses it so it’s just the inverted frequency spectrum. This scipt is from Chris Darwin and reproduced here with permission: The original can be found here:http://www.lifesci.sussex.ac.uk/home/Chris_Darwin/Praatscripts/Spectral%20RotationA similar technique was used here: Bédard, C., & Belin, P. (2004). A “voice inversion effect?”. Brain and cognition, 55(2), 247-249.Scale IntensityThis scales intensity to an RMS value. Use this if you want your sounds
to all be at an equivalent amplitude. By default intensity is normalized
to 70 dB.Trim SoundsThis trims sounds. You can trim a % of time off the ends of the sound,
or voicelab can automatically detect silences at the beginning and end
of the sound, and clip those out also.SpectrogramsVoiceLab creates full colour spectrograms. By default we use a wide-band
window. You can adjust the window length. For example, for a narrow-band
spectrogram, you can try 0.005 as a window length. You can also select a
different colour palate. You can also overlay pitch, the first four
formant frequencies, and intensity measures on the spectrogram.Power SpectraVoiceLab creates power spectra of sounds and overlays an LPC curve over
the top.Results TabThis is where you can view results. You can select each voice file on
the left and view each measurement result on the bottom frame. You can
also view your spectrograms in the spectrogram window. You can change
the size of any of these frames in order to see things better. PressSave Resultsto save data. All data (results &
settings), manipulated voices, and spectrograms are saved automatically
when this button is pressed. All you have to do is choose which folder
to save into. Don't worry about picking file names, Voice Lab will make
those automatically for you.Output formatsAll data files are saved as xlsxAll sound files are saved as wavAll image files are saved as png