Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Question about calling SAPI from javascript.

Question about calling SAPI from javascript.

Scheduled Pinned Locked Moved Web Development
helpquestionjavascripttools
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rryyjw
    wrote on last edited by
    #1

    Suppose now I have a webpage with following content.

    How are you?

    Question about calling SAPI from javascript. I came across a difficult problem. Could anybody help me? Thanks!

    How do you do?

    And I use the following script to interact with the speech engine. var VoiceObj = new ActiveXObject("Sapi.SpVoice"); VoiceObj.Speak(p2.innerText, SPF_ASYNC); //SPF_ASYNC == 2 What I want is to highlight the word which is currently being read by the speech engine. So it's a synchronization problem. I think I have to handle the Word event of the SpVoice object. So I wrote the following signature. But what code shall I put in this function? function VoiceObj::Word(Number, Position, CharacterPosition,Length) { } Very thanks! Jie

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups