__main__.py 614 Bytes
# AIfeng/2025-07-11 14:15:00
"""
豆包ASR模块主入口
支持通过 python -m asr.doubao 运行示例
"""

if __name__ == '__main__':
    from .example import run_all_examples
    import asyncio
    
    print("=== 豆包ASR语音识别服务示例 ===")
    print("正在运行所有示例...")
    
    try:
        asyncio.run(run_all_examples())
    except KeyboardInterrupt:
        print("\n用户中断执行")
    except Exception as e:
        print(f"执行失败: {e}")
        print("请确保已设置环境变量: DOUBAO_APP_KEY, DOUBAO_ACCESS_KEY")
        print("并准备好测试音频文件")