msaelices commited on
Commit
4a59798
1 Parent(s): cf20e81

Implement transcript with speakers in AssemblyAI

Browse files
Files changed (1) hide show
  1. engines.py +3 -2
engines.py CHANGED
@@ -53,8 +53,9 @@ class AssemblyAI:
53
  polling_response = requests.get(polling_endpoint, headers=headers)
54
  status = polling_response.json()['status']
55
 
56
- # TODO: Return the speakers and their text
57
- return polling_response.json()['text']
 
58
 
59
 
60
  class GoogleCloud:
 
53
  polling_response = requests.get(polling_endpoint, headers=headers)
54
  status = polling_response.json()['status']
55
 
56
+ return '\n'.join(
57
+ f'{utterance["speaker"]}: {utterance["text"]}' for utterance in polling_response.json()['utterances']
58
+ )
59
 
60
 
61
  class GoogleCloud: