From bf2ed8e437a07aeb4da5a1ce5302904ac2550f42 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 6 Sep 2024 10:25:28 +0800 Subject: [PATCH] bugfix --- rtcllm/rtc.py | 2 +- rtcllm/stt.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rtcllm/rtc.py b/rtcllm/rtc.py index a79724a..90bfd79 100644 --- a/rtcllm/rtc.py +++ b/rtcllm/rtc.py @@ -119,7 +119,7 @@ class RTCLLM: pc = peer.pc if track.kind == 'audio': f = partial(self.vad_voiceend, peer) - vadtrack = AudioTrackVad(track, stage=0, onvoiceend=f) + vadtrack = AudioTrackVad(track, stage=2, onvoiceend=f) peer.vadtrack = vadtrack vadtrack.start_vad() diff --git a/rtcllm/stt.py b/rtcllm/stt.py index 711a2db..67e3fdd 100644 --- a/rtcllm/stt.py +++ b/rtcllm/stt.py @@ -39,13 +39,13 @@ async def asr(a_file): r = None with open(a_file, 'rb') as f: oc = OAuthClient(DictObject(**opts)) - r = await oc('http://open-computing.cn', 'asr', {'audio_file':f}) + r = await oc('https://open-computing.cn', '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("http://open-computing.cn/asr/generate", data={ + async with session.post("https://open-computing.cn/asr/generate", data={ "model":"whisper", "audio_file":f }) as response: