General information
Category:
COM/DCOM and OLE Automation
In order to create a TTS application I'd converted a microsoft TTS sample but the feature which highlight every spoken word had been very tricky.
This task is achieved binding with EVENTHANLDER statement the object Voice with one of its methods called ISpVoice_Word so.
In the init method of the form must appear
loVoiceEngine= CREATEOBJECT("SAPI.SpVoice")
LOCAL oEvents
oEvents = NEWOBJECT("voice_methods") && generate error
EVENTHANDLER(loVoiceEngine, oEvents)
The class are define in the calling prg.
DEFINE CLASS voice_methods AS custom OLEPUBLIC
IMPLEMENT ISpVoice IN sapi.SpVoice
Procedure ISpVoice_Word(StreamNum As Long, StreamPos As Variant,;
Pos As Long, Length As Long)
xpos=pos
mlength=mlength
ochineseform.highlightspokenwords(pos,mlength)
ENDPROC
I got the error
Class cannot be instantiated because Member ISPVOICE_GetOutputObjectToken does not exist.
In the microsoft sample this member is not needed.
Does someone understand this behaviour or have expericnce using SAPI5 in VFP?
The Foxpro Advisor sample of 2001 only show a voice recognizer form.
Thanks in advance
Alejandro Fernandez
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only