bugfix
This commit is contained in:
parent
08a43e722f
commit
bf2ed8e437
@ -119,7 +119,7 @@ class RTCLLM:
|
|||||||
pc = peer.pc
|
pc = peer.pc
|
||||||
if track.kind == 'audio':
|
if track.kind == 'audio':
|
||||||
f = partial(self.vad_voiceend, peer)
|
f = partial(self.vad_voiceend, peer)
|
||||||
vadtrack = AudioTrackVad(track, stage=0, onvoiceend=f)
|
vadtrack = AudioTrackVad(track, stage=2, onvoiceend=f)
|
||||||
peer.vadtrack = vadtrack
|
peer.vadtrack = vadtrack
|
||||||
vadtrack.start_vad()
|
vadtrack.start_vad()
|
||||||
|
|
||||||
|
@ -39,13 +39,13 @@ async def asr(a_file):
|
|||||||
r = None
|
r = None
|
||||||
with open(a_file, 'rb') as f:
|
with open(a_file, 'rb') as f:
|
||||||
oc = OAuthClient(DictObject(**opts))
|
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=}')
|
print(f'{r=}')
|
||||||
return r
|
return r
|
||||||
|
|
||||||
with open(a_file, 'rb') as f:
|
with open(a_file, 'rb') as f:
|
||||||
async with aiohttp.ClientSession() as session:
|
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",
|
"model":"whisper",
|
||||||
"audio_file":f
|
"audio_file":f
|
||||||
}) as response:
|
}) as response:
|
||||||
|
Loading…
Reference in New Issue
Block a user