Last reviewed: 3/23/2024 10:37:28 AM
C++Builder VCL and FireMonkey Applications
Develop C++ applications that manage voice markup using your favorite version of C++Builder.
The following sections describe the steps for integrating VoiceMarkupKit with C++Builder VCL and FireMonkey applications.
VoiceMarkupKit Header Files
VoiceMarkupKit includes C++ header files comprised of the C++Builder classes that manage grammars and automatically load and unload the runtime DLL.
To access the VoiceMarkupKit C++Builder classes within your application, first add a project reference to the C++Builder header include files:
- Within your C++Builder project, select Project Options.
- Select the C++Builder compiler options.
- Add Include path reference to the VoiceMarkupKit header files directory: C:\Program Files\Chant\VoiceMarkupKit 10\CBuilder\include.
- For 64-bit apps, add Win64 as a conditional to the compiler options.
To access the VoiceMarkupKit C++Builder classes within your application, add a reference to the Chant shared and VoiceMarkupKit header files in your C++Builder application header file.
#include "Chant.Shared.h"
#include "Chant.VoiceMarkupKit.h"
Add a reference in your C++Builder application source file to the Chant shared and VoiceMarkupKit code needed to dynamically load and unload the runtime DLL.
#include "Chant.Shared.cpp"
#include "Chant.VoiceMarkupKit.cpp"
Object Instantiation
Declare a global variable for the VoiceMarkupKit class, instantiate an instance, set the credentials, and set the event handlers.
Add the following to your application header file:
private: // User declarations
CVoiceMarkupKit* _VoiceMarkupKit;
CAcaTTSVoiceMarkup* _AcaTTSVoiceMarkup;
CCereVoiceVoiceMarkup* _CereVoiceVoiceMarkup;
CSAPI5VoiceMarkup* _SAPI5VoiceMarkup;
CW3CSSMLVoiceMarkup* _W3CSSMLVoiceMarkup;
};
Add the following to your application source file:
// Instantiate VoiceMarkupKit object
_VoiceMarkupKit = new CVoiceMarkupKit();
if (_VoiceMarkupKit != NULL)
{
// Set credentials
_VoiceMarkupKit->SetCredentials("Credentials");
// Create VoiceMarkups
_AcaTTSVoiceMarkup = _VoiceMarkupKit->CreateAcaTTSVoiceMarkup();
_CereVoiceVoiceMarkup = _VoiceMarkupKit->CreateCereVoiceVoiceMarkup();
_SAPI5VoiceMarkup = _VoiceMarkupKit->CreateSAPI5VoiceMarkup();
_W3CSSMLVoiceMarkup = _VoiceMarkupKit->CreateW3CSSMLVoiceMarkup();
}
Event Callbacks
There are no event callbacks in VoiceMarkupKit.
Development and Deployment Checklist
When developing and deploying C++Builder VCL and FireMonkey applications, ensure you have a valid license, bundle the correct Chant class library, and configure your installation properly on the target system. Review the following checklist before developing and deploying your applications:
- Develop and deploy C++Builder VCL and FireMonkey applications to any system with a valid license from Chant. See the section License for more information about licensing Chant software.
- Copy CVoiceMarkupKit.dll to the target system and place in the same directory with your application.
- Deploy C++Builder VCL and FireMonkey applications to any system with a valid license from Chant. See the section License for more information about licensing Chant software.
- Copy CVoiceMarkupKitX64.dll to the target system and place in the same directory with your application.
Sample Projects
C++Builder VCL and FireMonkey sample projects are installed at the following location:
- Documents\Chant\VoiceMarkupKit 10\CBuilder.