|
|
|
@ -11,6 +11,7 @@
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
|
from typing import List
|
|
|
|
|
|
|
|
|
|
import numpy as np
|
|
|
|
@ -138,16 +139,6 @@ def forced_align(ctc_probs: paddle.Tensor, y: paddle.Tensor,
|
|
|
|
|
return output_alignment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ctc_align(
|
|
|
|
|
# self.model,
|
|
|
|
|
# self.align_loader,
|
|
|
|
|
# self.config.decoding.batch_size,
|
|
|
|
|
# self.align_loader.collate_fn.stride_ms,
|
|
|
|
|
# self.align_loader.collate_fn.vocab_list,
|
|
|
|
|
# self.args.result_file,
|
|
|
|
|
# )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def ctc_align(model, dataloader, batch_size, stride_ms, token_dict,
|
|
|
|
|
result_file):
|
|
|
|
|
"""ctc alignment.
|
|
|
|
|