SAPI Bookmarklet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am writing a tiny bookmarklet to read the text on webpages using MS Speech
SDK 5.1. It works fine on local pages on my computer, but it seems that the
"new ActiveXObject" line won't execute on webpages on the net and thus render
my bookmarklet useless. What can I do to get around that?


javascript:(function(){var VoiceObj=new ActiveXObject("Sapi.SpVoice");var
VoicesToken=VoiceObj.GetVoices();var
AudioOutputsToken=VoiceObj.GetAudioOutputs();VoiceObj.Voice=VoiceObj.GetVoices().Item(1);VoiceObj.AudioOutput=VoiceObj.GetAudioOutputs().Item(0);VoiceObjRate=3;VoiceObj.Volume=100;inputText=document.selection.createRange().text;try{VoiceObj.Speak(inputText,1)}catch(exception){alert("Speech
output error")}delete VoiceObj;})()
 
Klue said:
I am writing a tiny bookmarklet to read the text on webpages using MS Speech
SDK 5.1. It works fine on local pages on my computer, but it seems that the
"new ActiveXObject" line won't execute on webpages on the net and thus render
my bookmarklet useless. What can I do to get around that?

Is it a signed control? Is it marked safe? Try changing all your
currently disabled security settings to prompt and see which ones
you need to either leave as prompt or enable.

BTW is there a typo here (missing period?)
Would fixing that help?
VoiceObjRate=3


HTH

Robert Aldwinckle
---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top