Information générale
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement