Merge pull request #349 from alibaba-damo-academy/dev_zly2

vad bug fix
This commit is contained in:
zhifu gao 2023-04-13 15:07:51 +08:00 committed by GitHub
commit 4fffbae0c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -460,8 +460,8 @@ class E2EVadModel(nn.Module):
segment_batch = []
if len(self.output_data_buf) > 0:
for i in range(self.output_data_buf_offset, len(self.output_data_buf)):
if not self.output_data_buf[i].contain_seg_start_point or not self.output_data_buf[
i].contain_seg_end_point:
if not is_final and (not self.output_data_buf[i].contain_seg_start_point or not self.output_data_buf[
i].contain_seg_end_point):
continue
segment = [self.output_data_buf[i].start_ms, self.output_data_buf[i].end_ms]
segment_batch.append(segment)

View File

@ -470,8 +470,8 @@ class E2EVadModel():
end_ms = -1
self.next_seg = False
else:
if not self.output_data_buf[i].contain_seg_start_point or not self.output_data_buf[
i].contain_seg_end_point:
if not is_final and (not self.output_data_buf[i].contain_seg_start_point or not self.output_data_buf[
i].contain_seg_end_point):
continue
start_ms = self.output_data_buf[i].start_ms
end_ms = self.output_data_buf[i].end_ms