diff --git a/src/onlinebin/online-gmm-decode-faster.cc b/src/onlinebin/online-gmm-decode-faster.cc index 8ad86a489d4..46904dbc59e 100644 --- a/src/onlinebin/online-gmm-decode-faster.cc +++ b/src/onlinebin/online-gmm-decode-faster.cc @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) { OnlineFeatureMatrixOptions feature_reading_opts; decoder_opts.Register(&po, true); feature_reading_opts.Register(&po); - + po.Register("left-context", &left_context, "Number of frames of left context"); po.Register("right-context", &right_context, "Number of frames of right context"); po.Register("acoustic-scale", &acoustic_scale, @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) { po.PrintUsage(); return 1; } - + std::string model_rxfilename = po.GetArg(1), fst_rxfilename = po.GetArg(2), word_syms_filename = po.GetArg(3), @@ -151,7 +151,7 @@ int main(int argc, char *argv[]) { opts.order = kDeltaOrder; feat_transform = new OnlineDeltaInput(opts, &cmn_input); } - + // feature_reading_opts contains number of retries, batch size. OnlineFeatureMatrix feature_matrix(feature_reading_opts, feat_transform); @@ -200,4 +200,4 @@ int main(int argc, char *argv[]) { return -1; } #endif -} // main() +} // main() diff --git a/tools/extras/install_portaudio.sh b/tools/extras/install_portaudio.sh index 58797f554e8..36c95047a7f 100755 --- a/tools/extras/install_portaudio.sh +++ b/tools/extras/install_portaudio.sh @@ -14,10 +14,10 @@ #See the Apache 2 License for the specific language governing permissions and #limitations under the License. # -#This script attempts to install port audio, which is needed for the run-on -#decoding stuff. Portaudio enables the decoder to grab a live audio stream -#from the soundcard. I tested portaudio on Linux (RedHat and Suse Linux) and -#on MacOS 10.7. On Linux, it compiles out of the box. For MacOS 10.7, +#This script attempts to install port audio, which is needed for the run-on +#decoding stuff. Portaudio enables the decoder to grab a live audio stream +#from the soundcard. I tested portaudio on Linux (RedHat and Suse Linux) and +#on MacOS 10.7. On Linux, it compiles out of the box. For MacOS 10.7, #it is necessary to edit the Makefile (this script tries to do that). #The script will remove all occurances of # @@ -29,8 +29,8 @@ #also, it seems that one has to uncomment the inclusion of AudioToolbox in #include/pa_mac_core.h # -#All this should make it compile fine for x86_64 under MacOS 10.7 -#(always assuming that you installed XCode, wget and +#All this should make it compile fine for x86_64 under MacOS 10.7 +#(always assuming that you installed XCode, wget and #the Linux environment stuff on MacOS) echo "****() Installing portaudio" @@ -38,7 +38,7 @@ echo "****() Installing portaudio" if [ ! -e pa_stable_v19_20111121.tgz ]; then echo "Could not find portaudio tarball pa_stable_v19_20111121.tgz" echo "Trying to download it via wget!" - + if ! which wget >&/dev/null; then echo "This script requires you to first install wget" echo "You can also just download pa_stable_v19_20111121.tgz from" @@ -81,6 +81,8 @@ if [ -z "$MACOS" ]; then echo "${pa_patch}" | patch -p0 Makefile.in fi +patch -p0 Makefile.in < ../extras/portaudio.patch +autoconf ./configure --prefix=`pwd`/install --with-pic perl -i -pe 's:src/common/pa_ringbuffer.o:: if /^OTHER_OBJS\s*=/' Makefile @@ -93,7 +95,7 @@ if [ "$MACOS" != "" ]; then mv include/pa_mac_core.h include/pa_mac_core.h.bck cat include/pa_mac_core.h.bck \ | sed 's/\/\/\#include \/#include \/g' \ - > include/pa_mac_core.h + > include/pa_mac_core.h fi make diff --git a/tools/extras/portaudio.patch b/tools/extras/portaudio.patch new file mode 100644 index 00000000000..9fc201f9278 --- /dev/null +++ b/tools/extras/portaudio.patch @@ -0,0 +1,21 @@ +diff --git a/Makefile.in b/Makefile.in +index 24129a3..61a3952 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -44,7 +44,7 @@ PALIB = libportaudio.la + PAINC = include/portaudio.h + + PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \ +- -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \ ++ -export-symbols-regex "(Pa|PaUtil|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) + + COMMON_OBJS = \ +@@ -57,6 +57,7 @@ COMMON_OBJS = \ + src/common/pa_process.o \ + src/common/pa_stream.o \ + src/common/pa_trace.o \ ++ src/common/pa_ringbuffer.o \ + src/hostapi/skeleton/pa_hostapi_skeleton.o + + LOOPBACK_OBJS = \