简体   繁体   English

如何在 Unity 中使用 System.Speech?

[英]How to use System.Speech in Unity?

I want to use System.Speech to implement a text-to-speech to my unity desktop application.我想使用 System.Speech 为我的统一桌面应用程序实现文本到语音转换。 I don't get how to implement the System.Speech.我不知道如何实施 System.Speech。 When I type using System.Speech;当我using System.Speech; in my C# file, it gives error: The type or namespace name System.Speech could not be found (are you missing a using directive or an assembly reference?)在我的 C# 文件中,它给出错误:找不到类型或命名空间名称System.Speech (是否缺少 using 指令或程序集引用?)

I have copy the System.Speech.dll from C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0 to the asset folder, but it doesn't work.我已将System.Speech.dllC:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0复制到资产文件夹,但它不起作用。

When I add it using Nuget, it says that it doesn't compatible with any framework.当我使用 Nuget 添加它时,它说它与任何框架都不兼容。

Can someone explain how to add the reference, to make it works?有人可以解释如何添加参考以使其有效吗?

Thank you very much.非常感谢你。

you cant use this assembly directly in Unity, you have to have a wrapper你不能在 Unity 中直接使用这个程序集,你必须有一个包装器

you could find a solution Wrapper For unity你可以找到一个解决方案Wrapper For unity

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM