You can change his voice like Male and whisper, Female and Female whisper. This code use unly the male voice.
I have no problem whit this code. It wort. Merlin speak Whisper at back ground window. I give this code
[code]
// Merlin.TTSModeID = "{0879A4E1-A92C-11D1-B17B-0020AFED142E}" // Male voice
// Merlin.TTSModeID = "{0879A4E0-A92C-11D1-B17B-0020AFED142E}" // Female voice // To detect the state the window
//var _inactive_windows = Interop.Call('user32','GetBackgroundWindow');
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {
var _active_windows = Interop.Call('user32','GetForegroundWindow');
if (Origin !== Messenger.MyName && MessageKind === 1) {
if (Merlin.visible == false){
Merlin.Show()
}
if (ChatWnd.Handle === _active_windows) {
// si la fenêtre est au prmier plan
Merlin.Moveto(25,30,50);
//Merlin.Show();
Merlin.Play("Explain"); // changement de voix pounr voix d'homme aigue
Merlin.Speak(RemoveEmoticons(MsgPlus.RemoveFormatCodes("\\pit=300\\\\spd=160\\"+Message)));
} else {
Merlin.Moveto(25,30,50);
//Merlin.Show();
Merlin.Play("Explain"); // changement de voix pounr voix d'homme aigue en chuchotement
Merlin.Speak(RemoveEmoticons(MsgPlus.RemoveFormatCodes("\\Pit=300\\\\Spd=160\\\\chr=\"whisper\"\\"+Message)));
}
} else if (Origin !== Messenger.MyContacts && MessageKind === 1) {
Merlin.Moveto(25,30,50);
//Merlin.Show();
Merlin.Play("read"); // changement de voix pounr voix d'homme grave et normale
Merlin.Speak(RemoveEmoticons(MsgPlus.RemoveFormatCodes("\\pit=40\\\\spd=160\\"+Message)));
}
if (Origin !== Messenger.MyName && MessageKind === 2) {
if (Merlin.visible == false){
Merlin.Show();
}
if (ChatWnd.Handle === _active_windows) {
Merlin.Moveto(25,30,50);
Merlin.Play("Surprised")
Merlin.Play("Pleased");
Merlin.Speak("\\Pit=300\\\\Spd=160\\Vous avez reçu un clins d'oeuil!");
} else {
Merlin.Moveto(25,30,50);
Merlin.Play("Surprised")
Merlin.Play("Pleased");
Merlin.Speak("\\Pit=300\\\\Spd=160\\\\chr=\"whisper\"\\Vous n'avez pas vue le clins d'oeuil!");
}
}
else if (Origin !== Messenger.MyContacts && MessageKind === 2) {
Merlin.Moveto(25,30,50);
Merlin.Show();
Merlin.Play("Pleased");
Merlin.Speak("Vous avez envoyer un clins d'oeuil!");
}
}
[/code