added more support for language codes
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user