diff --git a/rtcllm/a2a.py b/rtcllm/a2a.py index 71169ec..edd9616 100644 --- a/rtcllm/a2a.py +++ b/rtcllm/a2a.py @@ -6,8 +6,6 @@ from aiortc import VideoStreamTrack, AudioStreamTrack class LLMAudioStreamTrack(AudioStreamTrack): def __init__(self, omni_infer): super().__init__() - self.ckpt_dir = ckpt_dir - # self.oi = OmniInference(ckpt_dir=ckpt_dir) self.oi = omni_infer self.audio_iters = [] self.cur_iters = None diff --git a/rtcllm/rtc.py b/rtcllm/rtc.py index 1f96313..75b9c2c 100644 --- a/rtcllm/rtc.py +++ b/rtcllm/rtc.py @@ -50,7 +50,6 @@ class RTCLLM: def __init__(self, ws_url, iceServers): # self.stt_model = WhisperModel('large-v3', device="cuda", compute_type="float16") self.ws_url = ws_url - self.omni_infer = self.omni_infer = OmniInference(ckpt_dir='/d/models/mini-omni') self.iceServers = iceServers self.peers = DictObject() @@ -116,7 +115,7 @@ class RTCLLM: async def auto_accept_call(self, data): opts = DictObject(iceServers=self.iceServers) pc = RTCPeerConnection(opts) - llmtrack = LLMAudioStreamTrack('/d/models/mini-omni') + llmtrack = LLMAudioStreamTrack(self.omni_infer) feed = awaitify(self.llmtrack._feed) self.peers[data['from'].id] = DictObject(**{ 'info':data['from'],