We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents be10644 + d4a365a commit 7893daeCopy full SHA for 7893dae
deepgram_captions/converters.py
@@ -1,9 +1,13 @@
1
+import json
2
from .helpers import chunk_array, replace_text_with_word
3
4
5
class DeepgramConverter:
6
def __init__(self, dg_response):
- self.response = dg_response
7
+ if not isinstance(dg_response, dict):
8
+ self.response = json.loads(dg_response.to_json())
9
+ else:
10
+ self.response = dg_response
11
12
def get_lines(self, line_length):
13
results = self.response["results"]
0 commit comments