Sim:Vox
Thank you for looking at my contract.
What I Have
A zip file of my code can be found here. It is about 140MB -- sorry, I left some binary stuff in there.
Please forgive the stupidity of the present build environment -- I really do not know the right way to do such things, and the part of this that we're looking at is taken from Android's codebase. Removing that build environment's greasy fingerprints was difficult for me, but I have successfully made the code build a JNI-compatible library on the Mac.
Deliverable
The contractor must deliver to me a modified version of a source tree handed which successfully builds a Windows DLL suitable for use by a Java app. It is not sufficient to hand me a built DLL, as I will need to work on this further.
The build environment
The project is called "Vox", and is intended to offer VOIP and speech recognition support to Java apps. We are only working on the speech recognition here: "SREC".
Within the top, "vox" directory, you will see Makefile.vox It has some parts at the top that you may well want to edit:
- VOX_ROOT_DIR on line 9 should be an absolute path to the vox directory on your filesystem
- VOX_MACHINE is what tells the rest of the makefiles that this is WIN32 (or MAC or...)
There is also a $(VOX_ROOT_DIR)/build folder with subfolders that are meant to show how various platforms (e.g., MAC and WIN) do things such as build a static library or a JNI library.
It would be nice if you can make changes to files in $(VOX_ROOT_DIR)/build/WIN to make this work.
I created two simple scripts in $(VOX_ROOT_DIR) to make the entire tree and clean it: "doit" and "clean"
BUILDING the SREC .DLL
The present tree almost builds what I need. On the Mac, it successfully builds libsrec_jni.jnilib
On Windows, I suppose it would be libsrec_jni.dll
If you look in $(VOX_ROOT_DIR)/doit, you can see the various steps of building pre-requisites, and the final step which fails to build srec_jni:
cd srec/portable ; make ; cd - cd srec/seti/sltsEngine ; make ; cd - cd srec/shared ; make ; cd - cd srec/srec/AcousticModels ; make ; cd - cd srec/srec/AcousticState ; make ; cd - cd srec/srec/ca ; make ; cd - cd srec/srec/EventLog ; make ; cd - cd srec/srec/Grammar ; make ; cd - cd srec/srec/Nametag ; make ; cd - cd srec/srec/Recognizer ; make ; cd - cd srec/srec/Semproc ; make ; cd - cd srec/srec/Session ; make ; cd - cd srec/srec/Vocabulary ; make ; cd - cd zlib ; make vox ; cd - cd zipfile ; make ; cd - cd tinyxml ; make ; cd - cd srec/tools/thirdparty/OpenFst/fst/lib ; make ; cd - echo This is the critical step! cd srec/srec_jni ; make ; cd - echo \n\n\n== ERRORS AFTER HERE NOT A WORRY ==\n\n\n # OPTIONAL SREC TOOLS -- not needed to fulfill the contract cd srec/tools/grxmlcompile ; make ; cd - cd srec/tools/make_g2g ; make ; cd - # VOIP THINGS -- also not needed to satisfy contract cd voip ; make ; cd - cd speex_jni ; make ; cd -
Other notes
- The DLL must be in 32 bit mode to work
- If possible, please touch only Makefile.vox and files in srec/srec_jni and build to make this work. If this approach is just too unpleasant for you, please make alternative Makefiles in the various folders visited by the "doit" script with the name "Makefile.WIN"
- You must preserve the existing functionality of the build for the Mac, which works now by cd-ing to $(VOX_ROOT_DIR) and typing "./doit" with Makefile.vox edited to indicate a Mac target.
- It is also necessary that I receive a build environment I can use for future work. That is, I do not simply require a .dll file, but a build system that can build it. My project is still under development, and I will have to continue work on this and similar DLLs.
- I'd very much like to avoid using Microsoft build tools. MinGW is what I've been using so far.
- Please test that Java's System.loadLibrary() call can load your DLL and that a call to the test function Java_android_speech_srec_Recognizer_Moo prints "moo" to the console before declaring success