Hi Chip,
I have not looked into it yet, but David is dealing with 2 platforms
already when using the SAPI 4 and 5 which were not compatible in any way. His
object for each requires different calls and different folders along with
different Registry information.
SAPI 4:
Set tts4 = CreateObject("ActiveVoice.ActiveVoice")
if Err.number > 0 then
tts4Q = False
else
tts4.Speak("")
voices4count = tts4.CountEngines
As you can see it is entirely different then SAPI 5 and my original example
did not get posted; at least it did not at my end probably thinking it is a
virus.
Have not as I said looked into Speech but may not require too much except
different properties and methods for the basic stuff since most of the new
speech is for recognition.
I do know that the object create requires a speechlib instead of the old
SPVoice but that is the best thing to look into on the new stuff besides speech
recognition.
I have been working on the Breaking News a little and to avoid any Internet
server issues I am extracting the data as posted and downloaded as a text file.
It is a pain in some ways but will attempt to try something this afternoon and
uploaded after choir rehersal.
Getting links off a page is very simple, getting the text information can
be a pain since some of the text is not in the link but in tables and lists
outside of the link.
Anyone can make a link list by searching for href= in that exact format and
extracting the information betwee the quotes for the format is this:
href="website.com/"
Anyone can make a list from that and the link format has some pains using
formatting characters in and outside of it for
the link format is:
<a href="website.com/" formating stuff> Text Displayed </a>
So links have <a website> text </a> where the <a > is the opening tag and the
</a> is the closing tag.
Now other format characters are:
<p formating> text </p> for paragraphs
<li formatting> </li> for lists
<div formating and id=""> </div>
Note in all cases the ending tag has the / in it and there are some times
websites can screw that up.
So ending tags:
</div>
</p>
</li>
</ul>
and even the ending of the web page is the same:
</body>
</html>
Inside the head section are all the styles and such and those can be handy
but has script functions you may not want as well as in the body of the page.
Enough for now I have to get busy on my new idea for extracting the data.
Bruce
Bruce
Sent: Wednesday, February 12, 2014 7:09 AM
Subject: RE: Using a SAPI voice?
Hi David and others,
I see that MS has replace SAPI with the Microsoft Speech Platform, which
evidently has a different way of interfacing with the voices.
Does anyone have any info on the two systems: when will SAPI stop being
supported; am I correct in thinking that the speech platform is not backwards
compatible with SAPI commands? Etc.
Was just wondering if a developer put a lot of effort into SAPI could he
count on it continuing to run for a long time?
Thanks.
Chip
From: David [mailto:[email protected]]
Sent: Monday, February 10, 2014 4:33 PM
To: [email protected]
Subject: Using a SAPI voice?
In my app, I am using a SAPI voice, to read out a certain amount of text. the
very basics of the code, is:
Dim SVoice: Set SVoice = CreateObject( "SAPI.SpVoice")
SVoice.Speak "blah-blah-blah!"
Allright, all of this works fine. Yet, since the text is somehow lengthy, and
I want other processes not to wait for all that text to be spoken, I have this
one question for you experienced developers.
Is there any instruction I can use, to send the text to the Sapi voice, and
immediately have the next line of code carried out? That is, some kind of an
instruction for the Sapi Object, to know that it is not supposed to wait for
the voice to finish speaking, before the code can move on.
Thanks for any response, and hope the above somehow made sense.
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com