-1

I'm currently doing a research on a offline desktop tool that is able to recognize to user' voice commands. For now, I look at is the possibility of using Microsoft's System.Speech API which is for desktop sapi.

In its official documentation, there is just some c# samples. But I need to use this api using c++ to be able implement my java application.

So my question is Does system.speech api supports to c++ language to development ?

ziLk
  • 3,120
  • 21
  • 45
  • 2
    System.Speech is a friendly wrapper for SAPI to provide speech support to a .NET program. You'll have to hoof the COM interface from C++. Sure, finding samples is going to be difficult and you'll find it rough going if you never done COM before in C++. You are probably better off creating a [ComVisible] class library in C# and use it from Java. You can't possibly be the first Java programmer doing this btw, a trivial google query came up with [this hit](https://github.com/chrisdevisser/Grade-12-ICS/blob/master/java_utilities/jna/Sapi.java). – Hans Passant Jun 08 '16 at 11:38

1 Answers1

1

In short, no. System.Speech is a managed library that runs on top of SAPI. On the other hand, SAPI itself is a C++ library. As Hans says, you're going to be far better off directly interacting with SAPI rather than trying to munge the .NET library into your Java app.

Eric Brown
  • 13,774
  • 7
  • 30
  • 71