'commit'
This commit is contained in:
@@ -6,7 +6,7 @@ import requests
|
||||
from Config.Config import HS_APP_ID, HS_ACCESS_TOKEN
|
||||
|
||||
|
||||
class ASRCService:
|
||||
class ASRClient:
|
||||
def __init__(self, appid=None, token=None, file_url=None):
|
||||
self.appid = appid or HS_APP_ID
|
||||
self.token = token or HS_ACCESS_TOKEN
|
||||
@@ -120,6 +120,6 @@ if __name__ == '__main__':
|
||||
# 使用指定的音频文件URL进行测试
|
||||
audio_url = "https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/Temp/temp_audio_20250822085243.wav"
|
||||
# 创建ASR客户端实例,传入指定的音频文件URL
|
||||
asr_service = ASRCService(file_url=audio_url)
|
||||
asr_client = ASRClient(file_url=audio_url)
|
||||
# 处理ASR任务并获取文本结果
|
||||
text_result = asr_service.process_task()
|
||||
text_result = asr_client.process_task()
|
Reference in New Issue
Block a user