created converter for speechmatics timing

This commit is contained in:
2018-11-22 03:56:03 -05:00
parent 4da2317db8
commit d5a37df5a8
12 changed files with 120525 additions and 16 deletions

View File

@@ -8,8 +8,8 @@ class TranscriptConverter:
def __init__(self, path, format_name):
self.path = path
with open(path, 'r') as fin:
self.words = converters[format_name](json.load(fin))
with open(path) as f:
self.words = converters[format_name](f)
def to_json(self):
return json.dumps(self.words, indent=4)