title: How to set voice SAPI5
body: <p>I don't realise how i can set some different voice? Yes! I read MSDN, and it didn't help</p>
  
  <p>ISpVoice * pVoice = NULL, * pv1 = NULL;</p>
  
  <pre><code>if (FAILED(::CoInitialize(NULL)))
      return FALSE;
  
  
  HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&amp;pVoice);
  if( SUCCEEDED( hr ) )
  {
      pVoice-&gt;SetVolume(100);
      //pVoice-&gt;SetVoice();
      hr = pVoice-&gt;Speak(L"Hello papa", SPF_IS_XML, NULL);
      pVoice-&gt;Release();
      pVoice = NULL;
  }
  </code></pre>