fix: auto-fix code issues (cron)
- 修复重复导入/字段 - 修复异常处理 (BaseException -> 具体异常类型) - 修复PEP8格式问题 - 添加类型注解 - 修复tingwu_client.py缩进错误
This commit is contained in:
@@ -34,24 +34,6 @@ class TingwuClient:
|
||||
|
||||
def create_task(self, audio_url: str, language: str = "zh") -> str:
|
||||
"""创建听悟任务"""
|
||||
endpoint = f"{self.endpoint}/openapi/tingwu/v2/tasks"
|
||||
|
||||
payload = {
|
||||
"Input": {
|
||||
"Source": "OSS",
|
||||
"FileUrl": audio_url
|
||||
},
|
||||
"Parameters": {
|
||||
"Transcription": {
|
||||
"DiarizationEnabled": True,
|
||||
"SentenceMaxLength": 20
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# 使用阿里云 SDK 方式调用 (endpoint 和 payload 供后续扩展使用)
|
||||
_ = endpoint
|
||||
_ = payload
|
||||
try:
|
||||
from alibabacloud_tingwu20230930 import models as tingwu_models
|
||||
from alibabacloud_tingwu20230930.client import Client as TingwuSDKClient
|
||||
|
||||
Reference in New Issue
Block a user