From 8b0fb74bded1f8a162e6c0e94c3522be6216ea03 Mon Sep 17 00:00:00 2001
From: chengligen <101448376+chengligen@users.noreply.github.com>
Date: 星期一, 26 五月 2025 14:11:33 +0800
Subject: [PATCH] feat: add 'words' key aligned with timestamps in sensevoice model output (#2531)
---
fun_text_processing/text_normalization/zh/verbalizers/cardinal.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fun_text_processing/text_normalization/zh/verbalizers/cardinal.py b/fun_text_processing/text_normalization/zh/verbalizers/cardinal.py
index 5606b02..6b4bcc7 100644
--- a/fun_text_processing/text_normalization/zh/verbalizers/cardinal.py
+++ b/fun_text_processing/text_normalization/zh/verbalizers/cardinal.py
@@ -4,13 +4,13 @@
class Cardinal(GraphFst):
- '''
- tokens { cardinal { integer: "涓�浜屼笁" } } -> 涓�浜屼笁
- '''
+ """
+ tokens { cardinal { integer: "涓�浜屼笁" } } -> 涓�浜屼笁
+ """
def __init__(self, deterministic: bool = True, lm: bool = False):
super().__init__(name="cardinal", kind="verbalize", deterministic=deterministic)
- graph = pynutil.delete('integer: \"') + pynini.closure(FUN_NOT_QUOTE) + pynutil.delete('\"')
+ graph = pynutil.delete('integer: "') + pynini.closure(FUN_NOT_QUOTE) + pynutil.delete('"')
self.fst = self.delete_tokens(graph).optimize()
--
Gitblit v1.9.1