silask 2024-12-31
only print translated text not timestamps
@b97db4bc1be5508d62e3c4f478f4b5120f2d3b6e
whisper_online.py
--- whisper_online.py
+++ whisper_online.py
@@ -534,9 +534,9 @@
         o = self.transcript_buffer.flush()
         self.commited.extend(o)
         completed = self.to_flush(o)
-        logger.debug(f">>>>COMPLETE NOW: {completed}")
+        logger.debug(f">>>>COMPLETE NOW: {completed[2]}")
         the_rest = self.to_flush(self.transcript_buffer.complete())
-        logger.debug(f"INCOMPLETE: {the_rest}")
+        logger.debug(f"INCOMPLETE: {the_rest[2]}")
 
         # there is a newly confirmed text
 
@@ -572,7 +572,7 @@
     def chunk_completed_sentence(self):
         if self.commited == []:
             return
-        logger.debug(self.commited)
+        logger.debug("COMPLETED SENTENCE: ", [s[2] for s in self.commited])
         sents = self.words_to_sentences(self.commited)
         for s in sents:
             logger.debug(f"\t\tSENT: {s}")
Add a comment
List