System.Speech in Mono on Linux

2019-01-20 14:48发布

问题:

I'm working on a project in Linux (KUbuntu) using Mono and Monodevelop. I want to use the System.Speech library, which is completely possible with Monodevelop in Unity on Windows 7. I've been doing a lot of looking online over the past few hours and as far as I can tell System.Speech WAS added to Mono.

I've updated all of mono, mono --version is showing 4.0.2 (latest version), and Monodevelop version is showing 5.9.4 (as far as I can tell that also is the most updated version). This is making me think that I have all of the latest updates for all the development software.

I've rebooted, created new projects, manually built monodevelop from git, everything I can think of. That all being done, I right click on References=>Edit References=>System.Speech, and nothing is showing up. Again I double checked by trying it on Unity on my windows machine, and it's definitely there.

Does anyone have any idea what's going on? I'm not really sure what other details to give for something like this but I'm clearly missing something. I'm more than happy to post any other information you would need, and I thank you infinitely for any help!

回答1:

System.Speech is a part of MSFT's .Net and is dependent on native audio drivers, the TLS engine, etc... and is only available on Windows.

I believe there was some work done in Mono with the Speech namespace 4/5 years ago, but there is nothing in this namespace in the current releases.

You would need to look at third party speech libs on Linux and write some C# wrappers for them if they are not currently available.