Support homophone replacer in Android asr demo. (#2210)

This commit is contained in:
Fangjun Kuang
2025-05-14 10:58:35 +08:00
committed by GitHub
parent fdda292d5a
commit 0dfafed7d0
2 changed files with 76 additions and 2 deletions

View File

@@ -296,7 +296,7 @@ HomophoneReplacer::HomophoneReplacer(Manager *mgr,
HomophoneReplacer::~HomophoneReplacer() = default;
std::string HomophoneReplacer::Apply(const std::string &text) const {
return impl_->Apply(text);
return RemoveInvalidUtf8Sequences(impl_->Apply(text));
}
#if __ANDROID_API__ >= 9