% little test script for mergeSounds()

[sound1, n1] = rawread('/home/speech/Numbers95/wav_sil/NU-95.zipcode.wav', 1024);  % Skip NIST header
n1
[sound2, n2] = rawread('/home/speech/noisex/ech.16.raw');   % No header on this one
n2

[soundMerged, alpha1, alpha2] = mergeSounds(sound1, sound2, 6, 8000, 16);
alpha1/alpha2
alpha1 * max(abs(sound1))/alpha2/max(abs(sound2))

figure; subplot(3,1,1); plot(sound1); subplot(3,1,2); plot(sound2); subplot(3,1,3); plot(soundMerged);

nistwrite(soundMerged, 8000, 16, '/home/home/lathoud/temp/merged.6.nist');
