|
From: Mailing l. u. f. U. C. a. U. <kal...@li...> - 2013-07-08 16:26:04
|
Hi all, I would like to thank you for implementing the kaldi compilation to shared libraries and merging them to trunk. It allows me to build python bindings easily for Kaldi decoders using cffi library (http://cffi.readthedocs.org/en/latest/.) So far, I managed to setup decoding example, which is based on Voxforge Online demo. All the C++ Kaldi functionality is called from Python via cffi. In order to try it, follow the steps below: # 1. svn checkout svn+ssh://oplatek@svn.code.sf.net/p/kaldi/code/sandbox/oplatek2 # Change your username # 2. INSTALL portaudio and cffi. # For portaudio: cd oplatek2/tools; ./install_portaudio.sh # For cffi you have options a) or b) # a) Go to http://cffi.readthedocs.org/en/latest/ and following the instructions install the cffi system wide! (Recommended) # Read the Requirements section! # b) Go to oplatek2/tools and install cffi locally by using install_cffi.sh. # After a successful installation the script prompts you to add the installation directory to PYTHONPATH. # Do it, it will be needed in step 7. # 3. cd oplatek2/src # 4. Configure it with --shared flag ./configure --fst-root=`pwd`/../tools/openfst --shared # 5. Build Kaldi. Clean it and tested to be sure that, it is not corrupted. make clean; make depend && make ext_depend && make && make ext && make test && make ext_test # 6. change to the directory with the example cd python-kaldi-decoding/pykaldi/binutils/ # 7. run make test, it should compile and downloaded everything needed make test # 8. Check the results! My results for python-online-wav-gmm-decode-faster are: python-compute-wer --config=configs/wer.config ark:work/reference.txt ark:work/online.trans.compact %WER 15.03 [ 55 / 366, 6 ins, 15 del, 34 sub ] %SER 100.00 [ 3 / 3 ] Scored 3 sentences, 0 not present in hyp. Any feedback is welcome! I am committing to https://github.com/oplatek/pykaldi . To svn.code.sf.net/p/kaldi/code/sandbox/oplatek2 I will commit just major updates which should not break things. Cheers, Ondra On Mon, Jul 8, 2013 at 10:59 AM, ondrej platek <ond...@se...>wrote: > I just check the results for my modified Voxforge-like recipe. > Everything worked, training, decoding, evaluation. > > My configuration: Ubuntu 10.04, using OpenBlas and shared flag: > ./configure --openblas-root=`pwd`/../tools/OpenBLAS/install > --fst-root=`pwd`/../tools/openfst --shared > > Ondra > > > On Mon, Jul 8, 2013 at 7:54 AM, Ho Yin Chan <ric...@gm...>wrote: > >> Simulated mode on online decoding demo run fine on CentOS too. >> >> Ricky >> >> On Sun, Jul 7, 2013 at 10:07 PM, Vassil Panayotov < >> vas...@gm...> wrote: >> >>> The compilation(including "make ext") is working OK for me too on Ubuntu >>> 10.04. >>> Only tried to run the online decoders(voxforge/online_demo) so far - >>> everything seems to be fine with them. >>> >>> Vassil >>> >>> >>> On Sun, Jul 7, 2013 at 5:31 AM, Daniel Povey <dp...@gm...> wrote: >>> > Everyone, >>> > I have just merged from ^/sandbox/sharedlibs, where Jan Trmal, Ondrej >>> > Platek and others have been working on different build scripts that >>> > now support a shared-library option. If anyone can test it and make >>> > sure it still works for them it would be great. >>> > If people have made local changes to their Makefiles they may get >>> conflicts. >>> > Dan >>> >> >> > |