Compare commits

..

1 Commits

Author SHA1 Message Date
jocelyn
fadf88a3ed [ADD]add logic of loop frame 2025-06-23 17:09:47 +08:00

View File

@ -17,8 +17,8 @@ class HumanStatus:
self._current_frame = 0
self._is_talking = False
self.last_frame_talking_status = "silent" # 记录上一帧讲话状态
self.next_frame_talking_status = "silent"
self.last_frame_is_talk = False # 记录上一帧讲话状态
self.next_frame_is_talk = False
def get_status(self):
return self._status
@ -57,8 +57,8 @@ class HumanStatus:
"""
audio_frame_length = batch_size
is_silent = True if not self._is_talking else False
first_speak = True if self._is_talking and self.last_frame_talking_status == "silent" else False
last_speak = True if self.last_frame_talking_status == "talk" and self.next_frame_talking_status == "silent" else False
first_speak = True if self._is_talking and not self.last_frame_is_talk else False
last_speak = True if self.last_frame_is_talk and not self.next_frame_is_talk else False
start_idx_list, last_direction = play_in_loop_v2(
frame_config,
startfrom,