Sim:Vox
Hi, Roman. Thank you for looking at my contract.
A zip file of my code can be found here.
Please forgive the stupidity of the 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 fingerprints was difficult for me.
VOX and 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
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 SREC's .DLL
The present tree almost builds what I need. On the Mac, it is 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:
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, Roman... srec/srec_jni cd srec/srec_jni ; make ; cd - echo \n\n\n== ERRORS AFTER HERE NOT A WORRY, ROMAN! ==\n\n\n # OPTIONAL SREC TOOLS -- not needed, Roman cd srec/tools/grxmlcompile ; make ; cd - cd srec/tools/make_g2g ; make ; cd - # VOIP THINGS -- not needed, Roman cd voip ; make ; cd - cd speex_jni ; make ; cd -
Other notes
- The DLL has to be in 32 bit mode to work
- If possible, touch only Makefile.vox and files in srec/srec_jni and build to make this work. If this is just too unpleasant, 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.
- 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