Click here to Skip to main content
15,923,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unable to create Service using Network Service Account Pin
Mark Salsbery16-Feb-07 8:46
Mark Salsbery16-Feb-07 8:46 
Question2 custom controls and scrolling Pin
cyn815-Feb-07 18:43
cyn815-Feb-07 18:43 
AnswerRe: 2 custom controls and scrolling Pin
Naveen15-Feb-07 19:05
Naveen15-Feb-07 19:05 
GeneralRe: 2 custom controls and scrolling Pin
cyn819-Feb-07 23:19
cyn819-Feb-07 23:19 
GeneralRe: 2 custom controls and scrolling Pin
Naveen19-Feb-07 23:22
Naveen19-Feb-07 23:22 
GeneralRe: 2 custom controls and scrolling Pin
cyn823-Feb-07 0:45
cyn823-Feb-07 0:45 
GeneralRe: 2 custom controls and scrolling Pin
Naveen23-Feb-07 0:53
Naveen23-Feb-07 0:53 
QuestionA question about Speech SDK API Pin
chocm15-Feb-07 18:32
chocm15-Feb-07 18:32 
I am doing a speech SDK related program, below is the code. its designed function is to read the text and save the speech into .wav file. But no voice can be heard when the exe running, I only got the .wav file after the exe finished, what I need is when the program run is running, users can hear the voice, at the same time, the sound is being processed into .wav file.

Thanks for help!


========================================================================

#include <sapi.h>
#include <sphelper.h>


#pragma comment(lib,"ole32.lib")
#pragma comment(lib,"sapi.lib")

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 ) )
{

CComPtr<ispstream> cpWavStream;
CComPtr<ispstreamformat> cpOldStream;
CSpStreamFormat OriginalFmt;
pVoice->GetOutputStream( &cpOldStream );
OriginalFmt.AssignFormat(cpOldStream);
hr = SPBindToFile( L"e:\\output.wav",SPFM_CREATE_ALWAYS,&cpWavStream,&OriginalFmt.FormatId(), \
OriginalFmt.WaveFormatExPtr() );
if( SUCCEEDED( hr ) )
{
pVoice->SetOutput(cpWavStream,TRUE);
WCHAR WTX[] = L"<voice required="\"gender=female\"">Hello world!";
pVoice->Speak(WTX, SPF_IS_XML, NULL);
pVoice->WaitUntilDone( INFINITE );

pVoice->Release();
pVoice = NULL;

}


}
::CoUninitialize();
return TRUE;
}


------------------------------------------------------------------------

Iphone service porviders list

------------------------------------------------------------------------
AnswerRe: how to embed my code in en image Pin
Hamid_RT15-Feb-07 18:23
Hamid_RT15-Feb-07 18:23 
GeneralRe: how to embed my code in en image Pin
sepel16-Feb-07 0:54
sepel16-Feb-07 0:54 
AnswerRe: how to embed my code in en image Pin
Sauce!15-Feb-07 19:29
Sauce!15-Feb-07 19:29 
GeneralRe: how to embed my code in en image Pin
sepel16-Feb-07 0:34
sepel16-Feb-07 0:34 
GeneralRe: how to embed my code in en image Pin
Sauce!16-Feb-07 1:18
Sauce!16-Feb-07 1:18 
GeneralRe: how to embed my code in en image Pin
sepel16-Feb-07 21:21
sepel16-Feb-07 21:21 
QuestionProblem with IXMLDOMNode::get_nodeValue Pin
NiceNaidu15-Feb-07 18:11
NiceNaidu15-Feb-07 18:11 
QuestionRe: Problem with IXMLDOMNode::get_nodeValue Pin
prasad_som15-Feb-07 18:47
prasad_som15-Feb-07 18:47 
AnswerRe: Problem with IXMLDOMNode::get_nodeValue Pin
NiceNaidu15-Feb-07 19:08
NiceNaidu15-Feb-07 19:08 
GeneralRe: Problem with IXMLDOMNode::get_nodeValue Pin
prasad_som15-Feb-07 19:19
prasad_som15-Feb-07 19:19 
GeneralRe: Problem with IXMLDOMNode::get_nodeValue Pin
NiceNaidu15-Feb-07 19:31
NiceNaidu15-Feb-07 19:31 
AnswerRe: Problem with IXMLDOMNode::get_nodeValue Pin
Michael Dunn15-Feb-07 20:47
sitebuilderMichael Dunn15-Feb-07 20:47 
GeneralRe: Problem with IXMLDOMNode::get_nodeValue Pin
NiceNaidu15-Feb-07 20:56
NiceNaidu15-Feb-07 20:56 
Questionfatal error LNK1104: cannot open file Pin
chocm15-Feb-07 18:05
chocm15-Feb-07 18:05 
AnswerRe: fatal error LNK1104: cannot open file Pin
Christian Graus15-Feb-07 18:06
protectorChristian Graus15-Feb-07 18:06 
GeneralRe: fatal error LNK1104: cannot open file Pin
NiceNaidu15-Feb-07 18:15
NiceNaidu15-Feb-07 18:15 
GeneralRe: fatal error LNK1104: cannot open file Pin
chocm15-Feb-07 18:15
chocm15-Feb-07 18:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.