You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there might be a race condition in the following section of the code:
# clip audio if the current chunk exceeds 30 seconds, this basically implies that# no valid segment for the last 30 seconds from whisperifself.frames_np[int((self.timestamp_offset-self.frames_offset)*self.RATE):].shape[0] >25*self.RATE:
duration=self.frames_np.shape[0] /self.RATEself.timestamp_offset=self.frames_offset+duration-5samples_take=max(0, (self.timestamp_offset-self.frames_offset)*self.RATE)
input_bytes=self.frames_np[int(samples_take):].copy()
duration=input_bytes.shape[0] /self.RATEifduration<0.4:
# If the audio duration is short, release the lock and waitself.lock.release()
time.sleep(0.01) # 5ms sleep to wait for some voice active audio to arrivecontinue
You are accessing a shared resource between threads without proper synchronization in this section. Could you please review this code?
The text was updated successfully, but these errors were encountered:
I believe there might be a race condition in the following section of the code:
You are accessing a shared resource between threads without proper synchronization in this section. Could you please review this code?
The text was updated successfully, but these errors were encountered: