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:
2019-03-07 22:55:37 -05:00
parent ed2ece3dfb
commit 3fc6dacfde
9 changed files with 75 additions and 62 deletions

View File

@@ -4,11 +4,14 @@ def universal_transcript(self, pretty=False):
return json.dumps(self.converted_words, indent=4 if pretty else None)
def viral_overlay(self, pretty=False):
return json.dumps([{
'start': word['start'],
'stop': word['end'],
'text': word['word'].title() if word['always_capitalized'] else word['word']}
return json.dumps([
{'start': word['start'],
'stop': word['end'],
'text': word['word'].title()
if word['always_capitalized'] else word['word']
}
for word in self.converted_words], indent=4 if pretty else None
for word in self.converted_words]
, indent=4 if pretty else None
)