Sim:Vox: Difference between revisions

From The Dreadnought Project
Jump to navigationJump to search
No edit summary
Line 65: Line 65:
#  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"
#  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.
#  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.
#  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.
#  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
#  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

Revision as of 15:31, 1 June 2012

Hi, Roman. Thank you for looking at my contract.

A zip file of my code can be found here. it is about 50MB.

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 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
  • 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 SREC's .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, 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

  1. The DLL has to be in 32 bit mode to work
  2. 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"
  3. 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.
  4. 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.
  5. I'd very much like to avoid using Microsoft build tools. MinGW is what I've been using so far.
  6. 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