From f89bc2eaa5d5583cc4d8d9c06d0b0d66185af2e1 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 7 Sep 2024 11:30:10 +0800 Subject: [PATCH] bugfix --- rtcllm/stt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtcllm/stt.py b/rtcllm/stt.py index c0bd6d2..291b62f 100644 --- a/rtcllm/stt.py +++ b/rtcllm/stt.py @@ -36,13 +36,14 @@ opts = { async def asr(a_file): if not a_file: return + """ r = None with open(a_file, 'rb') as f: oc = OAuthClient(DictObject(**opts)) r = await oc('https://sage.open-computing.cn/asr', 'asr', {'audio_file':f}) print(f'{r=}') return r - + """ with open(a_file, 'rb') as f: async with aiohttp.ClientSession() as session: async with session.post("https://sage.open-computing.cn/asr/api/generate.dspy", data={