Re: Program to modify RMS levels (Paul Boersma )

Subject: Re: Program to modify RMS levels
From:    Paul Boersma  <paul.boersma(at)HUM.UVA.NL>
Date:    Wed, 1 Aug 2001 22:11:01 +0200

Mitchell Sommers wrote: > Does anyone know of software that will allow users to modify (specify) > RMS levels. Ideally, it would accept .wav files but this is not a necessity. > I have several hundred speech files that I'd like to equalize based on RMS > levels so batch processing would be essential. you can do this easily with the Praat program ( It can be automatized with a Praat script, e.g. something like form Equalize RMS levels real New_RMS_level_(Pa) 0.1 comment Do it for all the WAV files in the source directory: text sourceDir d:\my raw stuff comment Put the equalized WAV files in the target directory: text targetDir d:\my equalized stuff endform Create Strings as file list... list 'sourceDir$'\*.wav numberOfFiles = Get number of strings for ifile to numberOfFiles select Strings list filename$ = Get string... ifile Read from file... 'sourceDir$'\'filename$' oldRmsLevel = Get root-mean-square... 0 0 Formula... 'new_RMS_level'*self/'oldRmsLevel' extremum = Get absolute extremum... 0 0 None if extremum > 0.99 exit We refuse to clip the samples in file "'sourceDir$'\'filename$'"!!! endif Write to WAV file... 'targetDir$'\'filename$' endfor echo Successfully equalized 'numberOfFiles' WAV files. This equalizes all the files in the directory "d:\my raw stuff", or in any other directory that you specify. By default, it would change all the RMS values to 0.1 "Pascal". If any sample gets outside the [-1; +1] range, the procedure is stopped because some samples in the resulting WAV file would be clipped. One can experiment with the RMS level setting in order to prevent this from happening. On the Macintosh, directories have to be specified like "Macintosh HD:My raw stuff", and the backslash becomes a colon. Test before use! Best wishes, Paul -- Paul Boersma Institute of Phonetic Sciences, University of Amsterdam Herengracht 338, 1016CG Amsterdam, The Netherlands phone +31-20-5252385

This message came from the mail archive
maintained by:
DAn Ellis <>
Electrical Engineering Dept., Columbia University