
This is a version of Praat which has an extra function added: Sound_to_Espeak(),
which produces a file: spectrum.dat  which can be loaded by espeakedit.

Praat source is available from  http://www.praat.org/
Use praat version 4.5.12 or later.

Packages Needed:
Package: "lesstif2" to run praat, and package: "lesstif2-dev" to compile praat.
(or alternatively packages "libmotif3" and "libmotif-dev").

I found that on my Ubunto 6.06 based system, praat would not run unless I
compiled it with an earlier version of the GCC compiler.  In makefile.defs,
I changed  -V3.3  after  "CC = gcc".


Modifications to add  "Sound_to_Espeak" function and button.
This analyses speech WAV data and produces a file: "spectrum.dat"
which can be loaded in  espeakedit  to show a sequence of time-slice
spectra.



1. Copy the file:   "Sound_JSD.c"  into the directory "fon".


2. In the file "fon/Makefile", add to the list of OBJECTS:  Sound_JSD.o


3. Edit the file:   fon/praat_Sound_Init.c,

after
	FORM (Sound_to_Spectrogram....
	...
	END
add

	FORM (Sound_to_Espeak, "From Sound to Spectrogram", "Sound: To Espeak...")
		POSITIVE ("Minimum pitch (Hz)", "75")
		POSITIVE ("Maximum pitch (Hz)", "300")
		POSITIVE ("Maximum frequency (Hz)", "9500")
		POSITIVE ("Frequency step (Hz)", "40")
		POSITIVE ("Maximum formant (Hz)", "5000")
		REAL ("Adjust (min freq)", "2500")
		OK
	DO
		EVERY_TO (Sound_to_Espeak (OBJECT, GET_REAL ("Minimum pitch"), GET_REAL ("Maximum pitch"),
			GET_REAL ("Maximum frequency"),
			GET_REAL ("Frequency step"),
			GET_REAL ("Maximum formant"),
			GET_REAL ("Adjust")))
	END


after
	praat_addAction1 (classSound, 0, "To Spectrogram...", 0, 1, DO_Sound_to_Spectrogram);
add
	praat_addAction1 (classSound, 0, "To eSpeak...", 0, 1, DO_Sound_to_Espeak);

