This commit is contained in:
yumoqing 2024-09-04 15:10:09 +08:00
parent 6694af192e
commit 5dd2d6283e
2 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,7 @@
aiortc aiortc
websockets websockets
webrtcvad webrtcvad
open-whisper faster-whisper
git+https://github.com/suno-ai/bark git+https://github.com/suno-ai/bark
nvidia-cublas-cu11
nvidia-cudnn-cu11

View File

@ -29,10 +29,14 @@ async def pc_get_local_candidates(pc, peer):
if not peer.l_candidates: if not peer.l_candidates:
peer.l_candidates = [] peer.l_candidates = []
peer.sdp_id = 0
for t in its: for t in its:
for c in t._connection.local_candidates: for c in t._connection.local_candidates:
if c not in peer.l_candidates: if c not in peer.l_candidates:
print(f'{c=}, {dir(c)}') print(f'{c=}, {dir(c)}')
c.sdpMid = str(peer.sdp_id)
peer.sdp_id += 1
peer.l_candidates.append(c) peer.l_candidates.append(c)
pc.emit('icecandidate', c) pc.emit('icecandidate', c)
@ -84,7 +88,10 @@ class RTCLLM:
await self.ws_send(json.dumps({ await self.ws_send(json.dumps({
"type":"iceCandidate", "type":"iceCandidate",
"to":to, "to":to,
"candidate":{'candidate':candidate.to_sdp(), 'type': candidate.type} "candidate":{
'candidate':candidate.to_sdp(),
'sdpMid':candidate.sdpMid,
'type': candidate.type}
})) }))
async def save_onlineList(self, data): async def save_onlineList(self, data):