Developer Stuff
All the programs downloadable from Herbi.org have been made with Microsoft Visual Studio 2003, using the C# and .NET framework programming technologies.
The source code for the Herbi.org InkTalk program is available for download here. This may be useful for developers to see how the program works, if they would like to add Ink to Speech functionality to their own programs. No guarantees are made relating to the downloadable content.
The first version of the InkTalk program was relatively simple; it linked together the Ink to Text technology of the Tablet PC, and the Text to Speech technology of Windows XP, (using SAPI, the Speech API.) As more functionality has been added to the InkTalk program, the source code has become less straightforward. For example, the user can interrupt the text as it's being spoken, and resume it later. This functionality requires asynchronous use of SAPI.
InkTalk Visual Studio Solution
The InkTalk program is made up of the following files:
| InkTalk.sln | Visual Studio solution file for InkTalk program |
| InkTalk.csproj | Visual Studio project file for InkTalk program |
| InkTalk.cs | Main source code file implementing the InkTalk Ink to Speech functionality |
| OptionsDlg.cs | Source code file implementing the Options dialog box functionality |
| AboutDlg.cs | Source code file implementing the About dialog box functionality |
| AssemblyInfo.cs | Source code file specifying some attributes of the InkTalk program |
| InkTalk.resx | Resource file |
| OptionsDlg.resx | Resource file |
| AboutDlg.resx | Resource file |
| InkTalk.ico | Icon file for InkTalk program |
The InkTalk program also need two other files in order to build and run.
Microsoft.Ink.dll
This assembly is part of the Tablet PC SDK, and can be used by developers to build ink-related programs. The InkTalk Visual Studio solution assumes that the file can be found in the folder "C:\Program Files\Microsoft Tablet PC Platform SDK\Include".
ITSAPI.dll
The SAPI 5.0 SDK uses a COM model, not managed assemblies. In order to make this easily callable by managed code, InkTalk needs a Runtime Callable Wrapper (RCW) which wraps SAPI. The RCW is in the list of references for the InkTalk project and is called ITSapi.dll. This assembly was generated using the Type Library Import tool available with Visual Studio 2003. The assumbly was created with the following command line:
"\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\TlbImp.exe" "\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll" /out:ITSapi.dll
Any developer with Visual Studio
2003 and the SAPI SDK installed can run this command. Note that no verification
has been done in InkTalk relating to how and when SAPI's unmanaged resources get
released when their lifetime is controlled by a managed caller.
Comments about the InkTalk code
In the future, the downloadable InkTalk code might have more comments added to it, to describe in more detail the action taken. For example, more documentation describing what code related to specific functionality, and more comments throughout the code. Also more description of the SAPI related flags and calls, including moving flag definition to a single place in the code, (and some checking of whether flags can be pulled from ITSAPI.dll rather than defining them specifically.) It would also be beneficial to remove any duplication of strings, (such as registry-related strings.)
Known issues with InkTalk V1.2
The InkTalk program has the following known issues today:
InkTalk does not automatically speak past the last punctuation in the text, so InkTalk explicitly moves the caret beyond the trailing punctuation if there is any.
When pasting RTF from the clipboard into the InkTalk window, InkTalk should only paste the text, not the formatted text. Pasting the formatted text can interfere with the tracking of the speech output.
If focus leaves the InkEdit control while text is being spoken, InkTalk will no longer show the dynamic highlighting.
String resources are hard coded.
Download the InkTalk source code
To download the InkTalk source code, and the ITSAPI.dll, click Install InkTalk source code. After you have installed the source code on your computer, you can open the InkTalk solution in Visual Studio and build the InkTalk program.