This use to work on Windows 10, but now it doesn't, and I can't find how to correct the code to make it work.
void __fastcall TForm1::ComboBox1Change(TObject *Sender)
{
ISpeechObjectTokenPtr token;
ISpeechObjectTokensPtr tokens;
tokens=SpVoice1->GetVoices(L"",L"");
token=tokens->Item(ComboBox1->ItemIndex);
SpVoice1->Voice=token;
}
Also errors (is not accessible) at:
SpVoice1->Volume
SpVoice->Rate
If I comment out the Voice
, Rate
, and Volume
, it compiles and runs fine.
Windows 10 64-bit build 19041.867