unity3d - 统一: SpeechLib works fine in editor but not in runtime

标签 unity3d speech

我正在尝试使用 SpeechLib 在 Unity 中实现文本转语音,它在编辑器中运行良好,但在 Windows 上运行构建时出现异常。这是错误:

NotSupportedException:不支持指定的方法。 在 System.__ComObject..ctor () [0x00006] 中:0 在(包装器 cominterop)SpeechLib.SpVoiceClass..ctor()

有人知道怎么解决吗?

提前致谢!

最佳答案

我找到了解决方案。

步骤:

  1. build设置
  2. 播放器设置
  3. 确保您选择了“独立”选项卡
  4. 打开“其他设置”标签
  5. API 兼容级别:选择 .Net 4.x
  6. 保存并构建

关于unity3d - 统一: SpeechLib works fine in editor but not in runtime,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62092863/

相关文章:

ios - 我们如何在 swift 4 和 IOS 11 中更改语音识别语言?

c# - 如何使 C# 应用程序崩溃

c# - 压缩 if-elseif-else 语句以节省比较

speech-recognition - 从谷歌语音 api 结果中检测流畅度

javascript - Web Audio Api 与 Web Speech Api 集成 - 将扬声器/声卡输出流式传输到语音识别 api

python - Ubuntu 和 Python : Time based scripting of multiple texts to speech

audio - 分割语音和清音语音?

c# - 表达式表示 `value' ,其中在 Unity 的线程内调用 StartCoroutine 时预期为 `type' 或 `method group'

c# - 如何使用 C# 和 Unity 知道设备是否已插入

unity3d - 更改默认场景网格颜色