added more support for language codes

This commit is contained in:
2019-03-25 23:07:28 +01:00
parent 6fb95b4dd5
commit 12006591fa
6 changed files with 23 additions and 12 deletions

View File

@@ -11,7 +11,7 @@ class AmazonConverter(TranscriptConverter):
name = 'amazon'
transcript_type = dict
def __init__(self, json_data):
def __init__(self, json_data, language_code='en-US'):
super().__init__(json_data)
def get_word_objects(self, json_data) -> list:

View File

@@ -8,7 +8,7 @@ class GentleConverter(TranscriptConverter):
name = 'gentle'
transcript_type = dict
def __init__(self, json_data):
def __init__(self, json_data, language_code='en-US'):
super().__init__(json_data)
def get_word_objects(self, json_data):

View File

@@ -10,7 +10,7 @@ class GoogleConverter(TranscriptConverter):
transcript_type = str
def __init__(self, transcript_data: str):
def __init__(self, transcript_data: str, language_code='en-US'):
super().__init__(transcript_data)
self.json_data = self.pre_process(transcript_data)

View File

@@ -11,7 +11,7 @@ class SpeechmaticsConverter(TranscriptConverter):
name = 'speechmatics'
transcript_type = dict
def __init__(self, path):
def __init__(self, path, language_code='en-US'):
super().__init__(path)
def get_word_objects(self, json_data):