written by Daniel 

 

BatchAcousticAnalysis

 

Use of this script

This script can be used for complete acoustic analysis of vowels, especially of multiple files (as a batch), at a fixed, predefined timepoint. Originally, the script was written for the analysis of the formant frequencies of 15 vowels in 10 repetitions. See an example of one Output file here.
 
 

Input Files

Several input textfiles have to be copied to the same directory where the script is situated:
- a vowelfile: The special vowelcode, i.e. "I+K"
- a sweepfile: The name of the acoustic file, i.e. "006" if the soundfile is named "xxxxxxx006"
- a timepointfile: The timepoint, where spectral slices are extracted, i.e. "0.954"
Examples for the special structure of the textfiles are linked.

Please note, that there are have to be no blanks in these files. Otherwise i.e. the output of the vowel code is wrong in the formant result file.

These files should contain the same number of lines and must be syncronized. That means: The vowelcode, the timepoint and the sweepnumber of every line are treated as "belonging together". So the analysis is wrong, if not every line number in all 3 files contains connected data.

After installing, the script can be run (how can I install a script?). Several parameters can be entered in a User window:
 
 

Parameters

 
- LPC order (roughly: determines the number of formants to be found; normally for reliable results SamplingRate/1000+2)

- Spectrogram bandwidth (determines the temporal and spectral resolution; for broadband spectrograms 200-300 Hz)

- Spectrogram range (roughly: determines the "blackness" of the spectrogram)

- Sound Data Path : Where are the soundfiles???

- Common Soundfilename: The name of the soundfiles, except the Repetition numbers

- Sweep Textfile : Location and name of the described sweepfile

- TimePointfile: Location and name of the described timepointfile

- Vokalfile: Location and name of the described vowelfile

-PS-Path: The generated pictures can be saved in the PS (Postscript) and EMF(for MS Word Import) format, if desired (see next point). Enter the location.

- Save afterwards: Every picture of the repeated process are saved in a PS and EMF format. Make sure there is enough capacity on the specified harddisc.Every repetition needs roughly 700kB.

- Zeilenbeginn: Where should the analysis start? Counts from the top of the 3 textfiles. Useful, if the analysis should not start from the beginning, i.e. after a break (to determine which vowel should be called, just enter the line for the desired vowel, to be found as the line number of "vokal.txt", in nearly each text editor).
 
 
 

Run the script

After clicking "OK" the analysis begins. In a loop all in the textfiles contained files are loaded. Whenever the pause window: "Make your selection in the Sound editor" appears, a selection should be marked in the uppopping sound editor (this selection will be analysed). After clicking "Continue" several analysis procedures are computed. In the picture window the spectrogram of the selection, a formant tracking in the upper part and a LPC and FFT spectra (at the specified timepoint) in the lower part are drawn. In the Info window all results of the acoustic analysis are written. This includes: Here is an example of such an Info window.

 

It is advised to work in parralel with a text editor (I prefer UltraEdit) to verify and adjust the values (for example formant values) every time they are written to the textfiles. Working in that manner has the advantage that the values can be corrected in connection with the spectrogram and formant tracking drawings, as they are seen DURING the analysis. So mistakes with spurious LPC peaks and obviously wrong trackings can be eliminated in presence of all analysis objects. Especially if it is known that the data will be difficult to analyse this described way of work is strongly advised.
After finishing the analysis with the specified file the button "Continue" in the "Click OK when finished with the analysis" window can be clicked. The next soundfile from the following line in the 3 input textfiles is loaded.
The proecedure repeats until the last soundfile from the input files is loaded.

 

 

Output Files


Different Outputfiles are written (every time appended):

 
- The whole Info window is appendedly written to a LOG file (named: formantlogfile)
 

- The values of the LPC analysis (the LPC roots) are written to the file "formantresults"

- The bandwidths of the LPC analysis (the LPC roots) are written to the file "bandbreitenresults".

- The content of the Picture window is written to a Postscript File.

- The content of the Picture window is written to a EMF File.


These files can be found in the SAME direcory where the script is situated.

 
Please note: All values have to be verified!!! (A LPC peak is not by default a formant !!!)





It is advised to Remove all objects except the "Strings objects" and the actual objects every 20 repetitions with the "Remove" command (memory and stability reasons).