Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Some14U on May 03, 2010, 11:20:37 am
-
I'm trying to enable the voice recognition using VC2008.
I added FS2_VOICER into the preprocessor definition and compile successfully.
But i get a run time error on
voicerec.cpp on Line 94
hr = p_grammarObject->LoadCmdFromResource(NULL, MAKEINTRESOURCEW(command_resource),
L"SRGRAMMAR", MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
SPLO_DYNAMIC);
if ( FAILED( hr ) )
{
MessageBox(hWnd,"Failed to load resource\n","Error",MB_OK);
break;
}
I was wondering how you enable voice rec into your stable builds?
I'm compiling branch 3.6.12 rev 6082 and trunk rev 6089.
My environment is W7 using WSDK 7.0 / SAPI 5.4.
I tried using the SAPI (5.1?) that the branch provided and tried VC2005 but i still get the same problem.
I'm pretty sure I'm missing a step somewhere but I don't mind switching to any VS suite in order to get it to work.
Sorry about posted it twice...
-
I'm trying to enable the voice recognition using VC2008.
I added FS2_VOICER into the preprocessor definition and compile successfully.
But i get a run time error on
voicerec.cpp on Line 94
hr = p_grammarObject->LoadCmdFromResource(NULL, MAKEINTRESOURCEW(command_resource),
L"SRGRAMMAR", MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
SPLO_DYNAMIC);
if ( FAILED( hr ) )
{
MessageBox(hWnd,"Failed to load resource\n","Error",MB_OK);
break;
}
I was wondering how you enable voice rec into your stable builds?
What version of windows are you running? And your fs2_open.log (http://www.hard-light.net/forums/index.php?topic=56279.msg1180359#msg1180359)? What version of the Windows/Platform SDK are you using?
Also if I remember correctly FSO has to be complied against the 5.1 speech API and not the 5.3.
-
I'm compiling branch 3.6.12 rev 6082 and trunk rev 6089.
My environment is W7 using WSDK 7.0 / SAPI 5.4.
I tried using the SAPI (5.1?) that the branch provided and tried VC2005 but i still get the same problem.
I'm pretty sure I'm missing a step somewhere but I don't mind switching to any VS suite in order to get it to work.
The build works fine, just no voice rec since its fails to init
-
There's a patch I have on my home PC, but I can't get to it at the moment. Zacam is familiar with it though too, and probably has a copy of it laying around somewhere. I'll try to catch him on IRC. Basically you need to add FS2_VOICER to the code and Freespace2 projects pre-proc defines, but also to the resource linker. That was the step I missed for RC1.
-
The build works fine, just no voice rec since its fails to init
No it is not working fine if voicer will not init. The fs2_open.log tells us (the programmers and support ninjas) a lot more about why voice fails to init than you could possibly try and describe to us. That is why we ask for the log when FSO is mis-behaving.
In light of my conversation with chief1983 on #scp, what version of VS2008 are you actually using?
-
I get the fs2 log asap, i have to recompile it since I'm been doing release builds for awhile now....
Im using VS2008Pro
hmm i might be missing adding it into the resource linker...
I guess try finding the freespace 2 resource linker and add it there.
-
Protip: Use batch compiling to always build both the release and debug configs. Makes these things lots easier.
-
Looks like its working now after i added it into resource
Thanks :)
I take note of that tip then :)
Cool now i could go tinker with it in 2010...feels like a major change from 2008 when I get time.
-
Only 3/4 of the builds are currently building in VS2010 FYI.
-
What he means is that with VS2010, you can build everything EXCEPT regular FRED builds.
-
Yes that exactly. I just couldn't remember if it was regular or debug FRED.
-
Ah Thanks for the heads up...
I'm partially transitioned into VS 2010 but won't fully utilize it until a few months later.
Need to read up the changes which I wasn't aware of.
However, I do love the new layout and feels a lot more responsive than the 2008.
Maybe it just me :P
-
Just be adviced that the voice recognition seems to be connected to strange CTD's encountered seemingly randomly.
Most probable cause being bad input filtering.
Ie. since the voice recognition only works on Windows, the speech API probably catches some noise and decides it's some invalid character or another, and the game can't handle the faulty input and crashes to desktop with no error messages.
...at least that's what I think would be most likely. Then again considering this is coding we're talking about, I could be totally wrong. :nervous:
-
IIRC, the speech API is bound to be ripped out sooner or later for a cross-platform replacement.
-
Probably later unless someone feels like tackling Sphinx integration. Haven't really had any volunteers other than a hobbyist who managed to get it working on one platform and then went away.