update fixes

This commit is contained in:
Gokul Mohanarangan
2023-08-28 14:32:21 +05:30
parent 49d6e2d1dc
commit ebbe01f282
2 changed files with 16 additions and 16 deletions

View File

@@ -27,19 +27,19 @@ class TranscriptLinerProcessor(Processor):
return
# cut to the next .
partial = Transcript(words=[])
partial = Transcript(translation=self.transcript.translation, words=[])
for word in self.transcript.words[:]:
partial.text += word.text
partial.words.append(word)
if "." not in word.text:
continue
partial.translation = self.transcript.translation
# emit line
await self.emit(partial)
# create new transcript
partial = Transcript(words=[])
partial = Transcript(translation=self.transcript.translation, words=[])
self.transcript = partial
async def _flush(self):