Fix #29 (for real)

This commit is contained in:
msqr1
2025-04-04 11:19:39 -07:00
parent 006199d103
commit 9e5d039ee5
5 changed files with 172 additions and 12 deletions

View File

@@ -80,7 +80,7 @@ index 035ffee..18edcd3 100644
#endif
diff --git a/src/recognizer.cc b/src/recognizer.cc
index 55d9991..c111038 100644
index 55d9991..44ac113 100644
--- a/src/recognizer.cc
+++ b/src/recognizer.cc
@@ -17,6 +17,7 @@
@@ -98,8 +98,7 @@ index 55d9991..c111038 100644
-
+const v128_t _32768fx4{wasm_f32x4_const_splat(32768.0f)};
bool Recognizer::AcceptWaveform(const float *fdata, int len)
-{
+{
{
Vector<BaseFloat> wave;
wave.Resize(len, kUndefined);
- for (int i = 0; i < len; i++)
@@ -116,3 +115,12 @@ index 55d9991..c111038 100644
return AcceptWaveform(wave);
}
@@ -844,7 +852,7 @@ const char* Recognizer::PartialResult()
clat = decoder_->GetLattice(decoder_->NumFramesInLattice(), false);
if (model_->winfo_) {
- WordAlignLatticePartial(clat, *model_->trans_model_, *model_->winfo_, 0, &aligned_lat);
+ WordAlignLattice(clat, *model_->trans_model_, *model_->winfo_, 0, &aligned_lat);
} else {
CopyLatticeForMbr(clat, &aligned_lat);
}