From 0af9a1cb4e80614664a8b0945a1559d17c4e9479 Mon Sep 17 00:00:00 2001 From: Binbin Zhang Date: Fri, 7 Nov 2025 16:22:14 +0800 Subject: [PATCH] [runtime] mv fst to frontend --- runtime/core/frontend/CMakeLists.txt | 1 + runtime/core/{utils => frontend}/fst.cc | 5 ++++- runtime/core/{utils => frontend}/fst.h | 8 ++++---- runtime/core/frontend/g2p_en.cc | 2 +- runtime/core/utils/CMakeLists.txt | 1 - 5 files changed, 10 insertions(+), 7 deletions(-) rename runtime/core/{utils => frontend}/fst.cc (96%) rename runtime/core/{utils => frontend}/fst.h (94%) diff --git a/runtime/core/frontend/CMakeLists.txt b/runtime/core/frontend/CMakeLists.txt index ed57c87..cca2de2 100644 --- a/runtime/core/frontend/CMakeLists.txt +++ b/runtime/core/frontend/CMakeLists.txt @@ -1,6 +1,7 @@ add_library(frontend STATIC lexicon.cc g2p_en.cc + fst.cc g2p_prosody.cc word_break.cc sentence_break.cc diff --git a/runtime/core/utils/fst.cc b/runtime/core/frontend/fst.cc similarity index 96% rename from runtime/core/utils/fst.cc rename to runtime/core/frontend/fst.cc index 47db068..a12c38d 100644 --- a/runtime/core/utils/fst.cc +++ b/runtime/core/frontend/fst.cc @@ -12,7 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "utils/fst.h" +#include "frontend/fst.h" + +#include +#include #include "fst/rmepsilon.h" diff --git a/runtime/core/utils/fst.h b/runtime/core/frontend/fst.h similarity index 94% rename from runtime/core/utils/fst.h rename to runtime/core/frontend/fst.h index 2379bcc..605df0b 100644 --- a/runtime/core/utils/fst.h +++ b/runtime/core/frontend/fst.h @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef UTILS_FST_H_ -#define UTILS_FST_H_ +#ifndef FRONTEND_FST_H_ +#define FRONTEND_FST_H_ #include #include #include "fst/fstlib.h" -#include "utils/log.h" +#include "utils/log.h" #include "utils/string.h" using fst::StdVectorFst; @@ -44,4 +44,4 @@ void ShortestPath(const std::string& input, const StdVectorFst* fst, } // namespace wetts -#endif // UTILS_FST_H_ +#endif // FRONTEND_FST_H_ diff --git a/runtime/core/frontend/g2p_en.cc b/runtime/core/frontend/g2p_en.cc index 87d471e..f2160f9 100644 --- a/runtime/core/frontend/g2p_en.cc +++ b/runtime/core/frontend/g2p_en.cc @@ -19,7 +19,7 @@ #include "utils/log.h" -#include "utils/fst.h" +#include "frontend/fst.h" #include "utils/string.h" #include "utils/utils.h" diff --git a/runtime/core/utils/CMakeLists.txt b/runtime/core/utils/CMakeLists.txt index 58074b2..83fb24c 100644 --- a/runtime/core/utils/CMakeLists.txt +++ b/runtime/core/utils/CMakeLists.txt @@ -1,5 +1,4 @@ add_library(utils STATIC - fst.cc string.cc utils.cc )