This commit is contained in:
yumoqing 2024-09-11 15:11:51 +08:00
parent 8db51c5240
commit 5aea5a4752

View File

@ -15,13 +15,14 @@ class LLMAudioStreamTrack(AudioStreamTrack):
try:
b = self.get_audio_bytes()
if b is None:
print('LLMAudioStreamTrack return None ...')
return b
frame = AudioFrame.from_ndarray(io.BytesIO(b), format='s16', layout='mono')
return frame
except Exception as e:
print_exc()
print(f'{self.__class__.__name__} recv() exception happened')
raise e
return None
def set_cur_audio_iter(self):
if len(self.audio_iters) == 0: