Home » Community » Newbie corner » TTS text2Speech in U++
Re: TTS text2Speech in U++ [message #37362 is a reply to message #37359] |
Thu, 27 September 2012 15:42   |
 |
koldo
Messages: 3437 Registered: August 2008
|
Senior Veteran |
|
|
Hello Arek
Wellcome to U++.
I do not know BSD text to speech libraries. However the one that you link seems very easy to use:
#include <stdafx.h>
#include <sapi.h>
int main(int argc, char* argv[])
{
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"Hello world", 0, NULL);
pVoice->Release();
pVoice = NULL;
}
::CoUninitialize();
return TRUE;
}
I recommend you to run the U++ examples, play with them, look for features you like and begin a very small project with the basic features like this text to speech sample.
Best regards
IƱaki
|
|
|
Goto Forum:
Current Time: Fri Jul 18 16:16:42 CEST 2025
Total time taken to generate the page: 0.00720 seconds
|