I am working on a project involving Speech Recognition and Text-to-speech on a Windows CE handheld device (WinCE 5.0, arm). I am using the latest 0.9.29 build of Lazarus from SVN.
The application I am building is a client/server application. I have a server (.Net) and a handheld client which connects to the server using a (wireless) socket connection (Wifi). This is working nicely. I'm using LNet on the client side for this.
Regarding the Text-to-Speech and Voice Recognition, I am considering two ways to implement this at the moment :
1. Handle the actual TTS and SR on the server, and send WAV-data over the socket connection. This is the easiest to implement, since I can use SAPI on the server and the Win CE handheld client only needs to play server-generated WAV files and send WAV files it recorded from it's headset back to the server. The downside to this approach is heavy network traffic (over wifi). Due to that, I don't think this approach will work out in the end. I have a proof-of-concept for this running on the server, works fine. I would still have to figure out how to play wav files and record wav files on Win CE using Lazarus.
2. Handle the TTS and SR on the Win CE handheld device itself, so only plain text (very small amounts of data) is transmitted over the wireless client-server connection. This way, server load will be less, and much, much less wireless network bandwith will be needed. However, I have to figure out how to implement TTS and SR on Win CE 5.0 (arm CPU).
For approach 2, my current idea is to use SAPI. I am still kind of new to Win CE programming, but I think OLE automation is the way to go for SAPI on Win CE 5.0. I have tried this, using the following code as a test :
procedure TForm1.Button2Click(Sender: TObject);
var
objOle: Variant;
begin
objOle := CreateOleObject('SAPI.SpVoice');
// objOle.Speak call here
end;
This code fails right at the CreateOleObject call. An exception is being generated, but the exception message is blank. No error message. I have tried creating OTHER Ole objects, Like InternetExplorer.Application, ADODB.Connection, ADOCE.RecordSet, to see if the problem lies in the SAPI object or in the CreateOleObject() implementation itself. For every Ole object I try to create like this, I get the same blank exception. Because of that, I think the problem might not be in my code, but in the combination Lazarus 0.9.29 / WinCE / arm.
I guess my questions are :
* Are there known problems in the ComObj unit, regarding the use of CreateOleObject() for WinCE 5.0 / arm ? Any solutions / workarounds for this ?
* Is Ole automation + SAPI the way to go for Text-to-Speech and Speech Rocognition on Win CE 5.0 (arm) ?
* Does anyone have other approaches for TTS and SR on Win CE 5.0 (arm) ? Preferrably free or low-cost solutions
I would appreciate any help in this a lot...