This commit is contained in:
yumoqing 2024-09-13 11:15:10 +08:00
parent 5b958b09a1
commit b53c82b2ec

View File

@ -50,7 +50,7 @@ class AudioTrackVad(MediaStreamTrack):
oldf = await self.track.recv() oldf = await self.track.recv()
self.sample_rate = oldf.sample_rate self.sample_rate = oldf.sample_rate
duration = (oldf.samples * 1000) / oldf.sample_rate duration = (oldf.samples * 1000) / oldf.sample_rate
print(f'{self.__class__.__name__}.recv(): {duration=}, {oldf.samples=}, (oldf.sample_rate=}') print(f'{self.__class__.__name__}.recv(): {duration=}, {oldf.samples=}, {oldf.sample_rate=}')
frames = self.resample(oldf) frames = self.resample(oldf)
for f in frames: for f in frames:
if self.debug: if self.debug: