simplified to not make output that is pipe-able, made google and amazon work with and without speaker IDs
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
import json
|
||||
|
||||
def universal_transcript(self, pretty=False):
|
||||
return json.dumps(self.converted_words, indent=4 if pretty else None)
|
||||
def universal(self):
|
||||
return json.dumps(self.converted_words, indent=4)
|
||||
|
||||
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']
|
||||
}
|
||||
def vo(self):
|
||||
transcript = []
|
||||
|
||||
for word in self.converted_words]
|
||||
, indent=4 if pretty else None
|
||||
)
|
||||
for word in self.converted_words:
|
||||
if word['always_capitalized']:
|
||||
word_word = word['word'].title()
|
||||
else:
|
||||
word_word['word']
|
||||
|
||||
transcript.append({
|
||||
'start': word['start'],
|
||||
'stop': word['end'],
|
||||
'text': word_word,
|
||||
})
|
||||
|
||||
return json.dumps(transcript, indent=4)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user