首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >部署时,未将System.Speech.dll对象设置为对象的实例

问部署时,未将System.Speech.dll对象设置为对象的实例
EN

Stack Overflow用户
提问于 2020-02-27 16:12:34
回答 1查看 142关注 0票数 0

它在本地系统上工作,但在实时服务器上不工作。我收到错误消息:

代码语言:javascript
复制
NullReferenceException: Object reference not set to an instance of an object.]
   System.Speech.Internal.ObjectTokens.SAPICategories.DefaultDeviceOut() +79
   System.Speech.Internal.Synthesis.VoiceSynthesis..ctor(WeakReference speechSynthesizer) +969
   System.Speech.Synthesis.SpeechSynthesizer.get_VoiceSynthesizer() +77
   System.Speech.Synthesis.SpeechSynthesizer.SetOutputToNull() +55
   System.Speech.Synthesis.SpeechSynthesizer.SetOutputStream(Stream stream, SpeechAudioFormatInfo formatInfo, Boolean headerInfo, Boolean closeStreamOnExit) +16
   System.Speech.Synthesis.SpeechSynthesizer.SetOutputToWaveStream(Stream audioDestination)
EN

回答 1

Stack Overflow用户

发布于 2021-12-02 12:13:02

确保您的服务器上的Microsoft Speech Platform is correctly installed。

另请参阅Microsoft Speech Platform SDK 11 Requirements and Installation页面底部的此注释。

重要

语音平台运行时11和语音平台SDK 11不包括用于语音识别或语音合成(TTS或文本到语音)的运行时语言。您必须单独安装它们。运行时语言包括语言模型、声学模型以及提供语音引擎以执行特定语言的语音识别或TTS所需的其他数据。语音识别或语音合成有不同的运行时语言。您下载的运行时语言的版本(例如,11.0版)必须与您安装的Speech Platform Runtime的版本匹配。您可以使用this link下载运行时语言。

最后,由于nullref专门出现在DefaultDeviceOut()方法中,因此请确保您的服务器实际上具有某种音频输出功能。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60428818

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档