test/app/utils/__init__.py

25 lines
684 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# -*- coding: utf-8 -*-
"""
工具模块
包含通用工具函数和辅助功能
"""
from .common import generate_task_id, validate_text_input, parse_language_code
from .audio import save_audio_array, load_audio_file, generate_temp_audio_path, cleanup_temp_file
from .text_processing import apply_itn_to_text, normalize_asr_text
__all__ = [
# 通用工具函数
"generate_task_id",
"validate_text_input",
"parse_language_code",
# 音频工具函数
"save_audio_array",
"load_audio_file",
"generate_temp_audio_path",
"cleanup_temp_file",
# ITN(逆文本标准化)功能 - 基于itntext
"apply_itn_to_text",
"normalize_asr_text",
]