About this plugin
This plugin allow us to use the Microsoft SAPI from our applications and therefore reproduce text to speech. The plugin can retrieve the system available voices and allow us to reproduce text to speech using any of the available voices. Also the plugin inform us when the text to speech starts and when the text to speech ends using their provided events/subroutines.
This plugin are imposible without the aid of this people:
Thanks a lot!
Create a new instance of an Sapi object. The result variable store the numeric ID of the new created Sapi object instance. You need this ID on other plugins actions.
Destroy a previously created instanace of an Sapi object. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.
Destroy all previously created instances of Sapi objects.
Resume (if paused) or start to reproduce the provided text with the currently used voice.
Pause the current text to speech reproduction.
Stop the current text to speech reproduction.
Find if the current text to speech reproduction is paused or not.
Retrieve the system available voices to be used when reproduce text to speech.
Set an specific voice to be used when reproduce text to speech.
Set a subroutine to be execute when a text to speech reproduction starts.
Set a subroutine to be execute when a text to speech reproduction ends.
All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.
But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:
Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:
:OnNeoPluginActionError AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]" Return
Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.