made google work again after change in formatting of saved transcript. added speaker_id support to base class and Google
This commit is contained in:
@@ -7,7 +7,9 @@ from . import converters
|
||||
|
||||
|
||||
|
||||
Word = namedtuple('Word', 'start end confidence word always_capitalized next_word')
|
||||
Word = namedtuple(
|
||||
'Word',
|
||||
'start end confidence word always_capitalized next_word speaker_id')
|
||||
|
||||
|
||||
class TranscriptConverter:
|
||||
@@ -58,6 +60,11 @@ class TranscriptConverter:
|
||||
def get_word_confidence(word_object):
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
@abc.abstractmethod
|
||||
def get_speaker_id(word_object):
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
@abc.abstractmethod
|
||||
def get_word_word(word_object):
|
||||
@@ -78,7 +85,8 @@ class TranscriptConverter:
|
||||
self.get_word_confidence(word_object),
|
||||
word,
|
||||
self.check_if_always_capitalized(word, index, tagged_words),
|
||||
self.get_next_word(word_objects, index)
|
||||
self.get_next_word(word_objects, index),
|
||||
self.get_speaker_id(word_object),
|
||||
)
|
||||
|
||||
def get_next_word(self, word_objects, index):
|
||||
|
||||
Reference in New Issue
Block a user