如何使用SAPI 5控制第三方文字转语音?

How to control third-party text-to-speech voices using SAPI 5?

Windows 包括 SAPI 5 API 让您控制 TTS 语音。但是我使用的是 Acapela Peter,它没有出现在 window TTS 对话框中。所以我不能在典型的 .NET APIs 中使用这个声音(例如这个 codeproject app). However the voice shipped with this text file : VoiceDescriptions.txt which seems like variables that I can feed into the SAPI engine to help it detect this voice. So my question is : How do I use this voice metadata to generate speech with SAPI? I have all of the referenced files installed with the voice. I found the SpVoice Win API 但它没有提到从文本加载元数据的任何方式。

[LANG,British]
@=eng.tml
PHOTREE=eng.trx
PROSO=eng.oso
F0=eng.f0r
DICTIONARY=eng.bab.dca
LDI=eng.bab.ldi
BNF=eng.bnx
BNFNOTAG=eng.notag.bnx
POST=eng.pst
GRI=eng.gri
GRO=eng.gro
SPD=180
Language=British
Info=eng.nfo


[VOICE,Peter22k,British,British]
Base=Peter22k.nuul
Coeff=Peter22k.coef
Database=Peter22k.vco
Info=Peter22k.nfo
Pitch=110
Speed=100
Freq=22050

看起来 Acapela 有一个 separate product 添加了一个 SAPI 接口层。

如果您想自己滚动它,您可以可以向 Acapela TTS 引擎写入 SAPI engine interface,但这是一项重要的工作(可能需要 2-3 个开发月)创建)。