[sphinxtrain] Add -openfst patch to adapt to changes in openfst 1.3.3.
Jerry James
jjames at fedoraproject.org
Wed Feb 6 20:53:28 UTC 2013
commit 6c66edffc74a9a880458b6beaf8de66a142dca9f
Author: Jerry James <jamesjer at betterlinux.com>
Date: Wed Feb 6 13:53:12 2013 -0700
Add -openfst patch to adapt to changes in openfst 1.3.3.
sphinxtrain-openfst.patch | 20 ++++++++++++++++++++
sphinxtrain.spec | 3 +++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/sphinxtrain-openfst.patch b/sphinxtrain-openfst.patch
new file mode 100644
index 0000000..e34e4ae
--- /dev/null
+++ b/sphinxtrain-openfst.patch
@@ -0,0 +1,20 @@
+--- src/programs/g2p_train/g2p_train.cpp.orig 2012-09-28 15:26:18.000000000 -0600
++++ src/programs/g2p_train/g2p_train.cpp 2013-02-06 13:43:13.050273099 -0700
+@@ -196,7 +196,7 @@ void relabel(StdMutableFst *fst, StdMuta
+ string dest = prefix+".fst.txt";
+ ostream *ostrm = new fst::ofstream(dest.c_str());
+ ostrm->precision(9);
+- s::FstClass *fstc = new s::FstClass(out);
++ s::FstClass *fstc = new s::FstClass(*out);
+ s::PrintFst(*fstc, *ostrm, dest, isyms, osyms, NULL, acceptor, show_weight_one);
+ ostrm->flush();
+ delete ostrm;
+@@ -355,7 +355,7 @@ void train_model(string eps, string s1s2
+ }
+
+ cout << "Minimizing model..." << endl;
+- MutableFstClass *minimized = new s::MutableFstClass(fst);
++ MutableFstClass *minimized = new s::MutableFstClass(*fst);
+ Minimize(minimized, 0, fst::kDelta);
+ fst = minimized->GetMutableFst<StdArc>();
+
diff --git a/sphinxtrain.spec b/sphinxtrain.spec
index 0734e14..7d87413 100644
--- a/sphinxtrain.spec
+++ b/sphinxtrain.spec
@@ -15,6 +15,8 @@ Source1: g2p_train.hpp
# Sent upstream 17 Jan 2013. Specify the python extension so it is built and
# installed properly.
Patch0: %{name}-extension.patch
+# Sent upstream 6 Feb 2013. Adapt to openfst 1.3.3.
+Patch1: %{name}-openfst.patch
BuildRequires: Cython
BuildRequires: lapack-devel
@@ -58,6 +60,7 @@ Python interface to cmusphinx3.
%prep
%setup -q
%patch0
+%patch1
# Add an accidentally omitted header file
cp -p %{SOURCE1} src/programs/g2p_train
More information about the scm-commits
mailing list