Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TTS in VFP
Message
From
20/02/2006 19:34:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
TTS in VFP
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01097628
Message ID:
01097628
Views:
65
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
Map
View

Click here to load this message in the networking platform