function display() { if (document.getSelection) { var str = document.getSelection(); } else if (document.selection && document.selection.createRange) { var range = document.selection.createRange(); var str = range.text; } else { var str = "Sorry, click-speak is not possible with your browser."; } if (str !== ""){ if (CanTalk) SpeechPlugin.Speak(str); str=""; document.selection.empty(); }else {return false}; } if (window.Event) document.captureEvents(Event.MOUSEUP); document.onmouseup = display; // ABOVE IS PHRASE-OR-WORD SPEAK // JUST PLUNK INTO JS AND REFER TO FILE, //NO NEED TO CALL IT // REMOVE DBLCLICK ELSEWHERE //WITH ABOVE, BELOW NO LONGER HAS USE //AND REF TO IT SHOULD BE REMOVED //BUT WE STILL NEED THIS FOR ONE-CLICK=SPEAK TWO-CLICK=CONCORD function sayit() { var oSource = window.event.srcElement; var parent=oSource.parentTextEdit; if(parent!=null){ var txtRnge=parent.createTextRange(); txtRnge.moveToPoint(event.x, event.y); txtRnge.collapse(); txtRnge.expand("word"); txtRnge.select(); var s=txtRnge.text; //alert(s); if(s!=""){ if (CanTalk) SpeechPlugin.Speak(s); } } } function SetMaryVoice1() { var CanTalk=IsSpeechPluginInstalled(); if (CanTalk){ var SpeechPlugin = document.SpeechPluginObj}; if (CanTalk==true) { var num=SpeechPlugin.GetNumOfVoices(); if(num > 1) { for(var i=1;i<=num;i++) { if(SpeechPlugin.GetVoiceLanguageID(i)==9) { EnglishVoice=i; if(SpeechPlugin.GetVoiceDescription(i)=='Mary') { foundVoice=true SpeechPlugin.SetVoice(i); // If the wanted voice was found, we make it be the active voice SpeechPlugin.Speak("Hello"); break; // if the wanted voice was found, there is no need to search any more } } } } document.write("
The active voice is :"+SpeechPlugin.GetVoiceDescription(SpeechPlugin.GetVoice())+"
") } } function IsSpeechPluginInstalled() { if (navigator.appName == 'Netscape') { if (navigator.plugins["SpeechPlugin"]) return (1); else return (0); } else if (navigator.appName == "Microsoft Internet Explorer") { return CheckIEControl(); } } function EmbedIt() { document.write(' ') document.write(' ') } function IsSpeechPluginInstalled() { if (navigator.appName == 'Netscape') { if (navigator.plugins["SpeechPlugin"]) return (1); else return (0); } else if (navigator.appName == "Microsoft Internet Explorer") { return CheckIEControl(); } }