Compare commits
1 Commits
fadf88a3ed
...
f1856d2753
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f1856d2753 |
@ -100,6 +100,7 @@ class AudioInferenceHandler(AudioHandler):
|
||||
audio_frames.append((frame, type_))
|
||||
if type_ == 0:
|
||||
is_all_silence = False
|
||||
human_status.next_frame_is_talk = True
|
||||
|
||||
if not self._is_running:
|
||||
print('AudioInferenceHandler not running')
|
||||
@ -107,6 +108,7 @@ class AudioInferenceHandler(AudioHandler):
|
||||
|
||||
self.startfrom = self.frame_indexes[-1] if self.frame_indexes else 0
|
||||
if is_all_silence:
|
||||
human_status.last_frame_is_talk = False
|
||||
self.frame_indexes, self.last_direction = human_status.get_index_v2(self.startfrom, self.person_config["frame_config"], self.last_direction, batch_size) # [1,3,4]
|
||||
for i, frame_idx in zip(range(batch_size), self.frame_indexes):
|
||||
if not self._is_running:
|
||||
@ -116,6 +118,7 @@ class AudioInferenceHandler(AudioHandler):
|
||||
# index = index + 1
|
||||
else:
|
||||
human_status.start_talking()
|
||||
human_status.last_frame_is_talk = True
|
||||
logger.info(f'infer======= {current_text}')
|
||||
# human_status.try_to_talk()
|
||||
t = time.perf_counter()
|
||||
|
Loading…
Reference in New Issue
Block a user