From 4d907718f39e2b0f7a0c714c2e3de289e742fc61 Mon Sep 17 00:00:00 2001
From: Carl <415692979@qq.com>
Date: 星期四, 28 三月 2024 13:42:00 +0800
Subject: [PATCH] 修正commit 87b62d68957a2194b017a43b6c2a15424a05a984 引入的英文整句标点预测导致末尾两个单词中间的空格被删除的问题。 (#1556)
---
funasr/models/specaug/specaug.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/funasr/models/specaug/specaug.py b/funasr/models/specaug/specaug.py
index e5da8e2..49f83e2 100644
--- a/funasr/models/specaug/specaug.py
+++ b/funasr/models/specaug/specaug.py
@@ -7,9 +7,11 @@
from funasr.models.specaug.mask_along_axis import MaskAlongAxisVariableMaxWidth
from funasr.models.specaug.mask_along_axis import MaskAlongAxisLFR
from funasr.models.specaug.time_warp import TimeWarp
+from funasr.register import tables
import torch.nn as nn
+@tables.register("specaug_classes", "SpecAug")
class SpecAug(nn.Module):
"""Implementation of SpecAug.
@@ -99,7 +101,8 @@
x, x_lengths = self.time_mask(x, x_lengths)
return x, x_lengths
-class SpecAugLFR(AbsSpecAug):
+@tables.register("specaug_classes", "SpecAugLFR")
+class SpecAugLFR(nn.Module):
"""Implementation of SpecAug.
lfr_rate锛歭ow frame rate
"""
--
Gitblit v1.9.1