ASP.NET 中的文本转语音

发布于 2024-07-23 06:51:18 字数 131 浏览 8 评论 0原文

我想在带有 .net 框架的专用 Windows 2003 x64 服务器上使用 c# 进行一些日语文本到语音转换 我在谷歌上找到了一些东西,但需要在服务器上安装很多文件...我不喜欢,出于稳定性问题:还有另一个选择,比如链接的 dll 之类的?

I would like to do some japanese text to speech on my dedicated windows 2003 x64 server with .net framework, using c#
I found something on google, but requires to install a lot of files on the server... i don't like, for stability issues: there is another option, like a linked dll or something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

乱世争霸 2024-07-30 06:51:19

System.Speech.Synthesis 命名空间自 .NET 3.0 以来一直是框架的一部分。 但是,它对语音 SDK COM 库具有内部依赖性(它根据主机操作系统选择正确的版本),因此我建议您在开始之前对工作进行原型设计。

您可能应该首先查看的类是 System.Speech.Synthesis.SpeechSynthesizer (白皮书和示例代码

警告:我亲身经历过在 ASP.NET 环境中使用语音 API 时出现问题,导致返回音频数据的请求从未返回。 尽管进行了大量调试,我始终无法解决该问题,并且该功能被删除。 我与 Microsoft 的支持案例已持续 12 个月未解决。

The System.Speech.Synthesis namespace has been part of the framework since .NET 3.0. However, it has internal dependencies on the Speech SDK COM libraries (it chooses the correct version depending on the host OS), so I would recommend prototyping the work before you jump in.

The class you should probably look at first is System.Speech.Synthesis.SpeechSynthesizer (whitepaper and example code)

Warning: I have personally experienced issues using the speech APIs in an ASP.NET environment whereby the request that returned the audio data never returned. Despite heavy debugging I was never able to resolve the issue and the feature was dropped. I have had an unresolved support case with Microsoft for 12 months now.

呆萌少年 2024-07-30 06:51:18

您可以使用 Microsoft 语音 SDK 。 它是一组包含 TTS 和 SR 引擎的 COM API。 我不确定它是否包含日语 TTS。

You can use Microsoft Speech SDK. It's a set of COM APIs containing TTS and SR engines. I'm not sure if it contains Japanese TTS though.

滿滿的愛 2024-07-30 06:51:18

您最可能需要的是 Microsoft Speech Server,特别是如果您的网站将遇到任何合适的负载或体积。

从网站:

“一个语音平台,MSS包含了所有
用于部署的服务器组件
电话(纯语音)和多模式
(语音/视觉)应用程序。 MSS
结合了网络技术,
语音处理服务,以及
将电话功能集成到一个
系统。 ”

还有一个专门的 Microsft Speech 社区,它可能会帮助您入门另外,我不确定最新版本是什么...2004 R2

? ="nofollow noreferrer">这篇文章有一个不错的图表,概述了各个组件,看起来很适合与 ASP Web 应用程序集成。

What you most likely want is the Microsoft Speech Server especially if your webite is going to encounter any decent load or volume.

From the site:

"A speech platform, MSS contains all
the server components for deploying
telephony (voice-only) and multimodal
(voice/visual) applications. MSS
combines Web technologies,
speech-processing services, and
telephony capabilities into a single
system. "

There is also a dedicated Microsft Speech community which will likely help you get started in this realm. Also, I'm not sure what the latest version is...2004 R2?

This article has a decent diagram outlining the various components. Looks like a good fit for integration with an ASP Web Application.

左岸枫 2024-07-30 06:51:18

在 ASP.NET 网站中使用 SAPI 是不可能的:声音将在服务器上再现:S

似乎需要 微软语音服务器
...
或不? 使用 asp.net 可以在服务器上运行命令行 exe 来保存 mp3,然后流式传输该 mp3,对吧? (如何做到这一点?我会尝试弄清楚)
我会走这条路,我让你知道结果:)

编辑:这就是我解决的方法:
如何保存文本-使用 Microsoft SAPI 将语音转换为 wav?

我将生成的语音保存在 wav 文件中,然后将其嵌入到页面上,在 Flash 播放器中播放
凉爽的!!

using SAPI in an ASP.NET website, is impossible: the sound will be reproduced on the server :S

It seems that there is the need of Microsoft Speech Server
...
Or not? With asp.net is possible to run a commandline exe on the server to save an mp3, then stream that mp3, right? (how to do that? i will try to figure it)
I will go this way, i let you know the result :)

edit: this is how i solved:
How to save text-to-speech as a wav with Microsoft SAPI?

I save the generated voice in a wav file, then i embed it on the page, playing it in a flash player
COOL!!

私野 2024-07-30 06:51:18

Use Microsoft Speech Library and see this article Text to Speech with the Microsoft Speech Library and SDK version 5.1 in CodeProject. Also see Giving Computers a Voice in Coding4Fun

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文