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