这用于在 Windows 10 上工作,但现在不能,而且我找不到如何更正代码以使其工作。
void __fastcall TForm1::ComboBox1Change(TObject *Sender)
{
ISpeechObjectTokenPtr token;
ISpeechObjectTokensPtr tokens;
tokens=SpVoice1->GetVoices(L"",L"");
token=tokens->Item(ComboBox1->ItemIndex);
SpVoice1->Voice=token;
}
还有错误(无法访问):
SpVoice1->Volume
SpVoice->Rate
如果我注释掉Voice
,Rate
和Volume
, 它将编译并运行良好。
Windows 10 64 位内部版本 19041.867