
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/
These notes are for praat version 5.3.41 or later on Linux.

Packages Needed:

install packages:  libgtk2.0-dev  libasound-dev



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.cpp"  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.cpp,

=======================
after the #include statements at the start of the file, add:

Spectrogram Sound_to_Espeak(Sound me, double fmin, double fmax, double maxfreq, double minFreqStep1, double maxformant, double phase);


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

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

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

=======================
