Reputation: 1119
SAPI documentation cover the creation and deletion of a recognition profile. But how can I do it with SpeechLib
? I would like to:
When exiting my app:
BTW: Is SpeechLib
documented?
Upvotes: 1
Views: 315
Reputation: 13942
SpeechLib documentation is found by looking for SAPI Automation interfaces.
Profiles are a type of SpObjectToken, and can be enumerated using the SpObjectTokenCategory object. Specifically, create a new SpObjectToken, and set the ID, then use EnumerateTokens to get the profiles. (This example uses VB, but you should be able to translate)
Dim E As SpeechLib.ISpeechObjectTokens 'an enumeration of object tokens
Dim C As SpeechLib.SpObjectTokenCategory 'a category of object tokens
Set C = New SpObjectTokenCategory
C.SetId SpeechCategoryRecoProfiles
List1.AddItem " " & C.Id
Set E = C.EnumerateTokens()
For Each T In E
List1.AddItem " " & T.GetDescription
Next
Upvotes: 3