Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/onlinebin/online-gmm-decode-faster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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),
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -200,4 +200,4 @@ int main(int argc, char *argv[]) {
return -1;
}
#endif
} // main()
} // main()
18 changes: 10 additions & 8 deletions tools/extras/install_portaudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand All @@ -29,16 +29,16 @@
#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"

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"
Expand Down Expand Up @@ -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

Expand All @@ -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 \<AudioToolbox\/AudioToolbox.h\>/#include \<AudioToolbox\/AudioToolbox.h\>/g' \
> include/pa_mac_core.h
> include/pa_mac_core.h
fi

make
Expand Down
21 changes: 21 additions & 0 deletions tools/extras/portaudio.patch
Original file line number Diff line number Diff line change
@@ -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 = \