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: