diff --git a/dsLightRag/Util/ASRClient.py b/dsLightRag/Util/ASRCService.py similarity index 97% rename from dsLightRag/Util/ASRClient.py rename to dsLightRag/Util/ASRCService.py index a14d27af..8402a3f5 100644 --- a/dsLightRag/Util/ASRClient.py +++ b/dsLightRag/Util/ASRCService.py @@ -6,7 +6,7 @@ import requests from Config.Config import HS_APP_ID, HS_ACCESS_TOKEN -class ASRClient: +class ASRCService: 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_client = ASRClient(file_url=audio_url) + asr_service = ASRCService(file_url=audio_url) # 处理ASR任务并获取文本结果 - text_result = asr_client.process_task() + text_result = asr_service.process_task()