-1

I've got problems with generating the Helper Functions of MS Sapi 5.4 with Com4j. I have to replace the combination of SAPI and Java/JNI with Com4j. For Example, I want to use the AssignFormat Method of CSpStreamFormat. A simple text to speech was no problem, so i can say that it works in basics. Any one who knows how to access the full method set (especially helper functions) of sapi 5.4 via com4j?

Thanks Stefan

S. J. P.
  • 1
  • 1
  • Can you show what you've done so far? – Eric Brown Jul 15 '16 at 16:22
  • I can't show you this week, but I generated the java files from sapi.dll . As I saw, they are in the example files of com4j, too. It's the speech example. Second what i realized was that the helper functions of sapi are defined in extra header files, e.g. sphelper.h So i would need to use this h.-files with com4j. Is their a possibility to generate java code with com4j to use header files (additional to the dll)? – S. J. P. Jul 17 '16 at 14:02

1 Answers1

0

sphelper.h is just a set of macros and static functions. As such, a mechanical translation from C++ to Java is your best option. Not being terribly familiar with Java, I can't recommend anything, but a quick google search provides some alternatives.

Eric Brown
  • 13,774
  • 7
  • 30
  • 71
  • Translate the few functions, i use, from c++ to java was my first idea too. But problem is that com4j did not 100% generated sapi to use with java. There are some methods missing, not only in my generated code, also in the example -com4jdir-/samples/speech/. Which is the generated Java code of Sapi created by the com4j developer, i found out. – S. J. P. Jul 28 '16 at 09:01