所以,我有一个使用 SAPI 的程序,如下所示:
ISpVoice * pVoice = NULL;
if (FAILED(::CoInitialize(NULL)))
{
return FALSE;
}
HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
if( SUCCEEDED( hr ) )
{
hr = pVoice->Speak(L"I can talk!", SPF_IS_XML, NULL);
}
但我想声明一个变量,然后让 sapi 说出它们。我怎么做?
谢谢