bugfix
This commit is contained in:
parent
08a43e722f
commit
bf2ed8e437
@ -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()
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user