Mbonea commited on
Commit
6ab5444
1 Parent(s): 1c49e44

Heygen Token

Browse files
Files changed (2) hide show
  1. App/TTS/TTSRoutes.py +1 -0
  2. App/TTS/utils/HeyGen.py +3 -1
App/TTS/TTSRoutes.py CHANGED
@@ -12,6 +12,7 @@ tts = PodcastleAPI(**data)
12
  data = {
13
  "account": os.environ.get("HEYGEN_USERNAME"),
14
  "password": os.environ.get("HEYGEN_PASSWORD"),
 
15
  }
16
  heyGentts = HeygenAPI(**data)
17
 
 
12
  data = {
13
  "account": os.environ.get("HEYGEN_USERNAME"),
14
  "password": os.environ.get("HEYGEN_PASSWORD"),
15
+ "token": os.environ.get("HEYGEN_TOKEN"),
16
  }
17
  heyGentts = HeygenAPI(**data)
18
 
App/TTS/utils/HeyGen.py CHANGED
@@ -3,10 +3,11 @@ from App.TTS.Schemas import HeyGenTTSRequest
3
 
4
 
5
  class HeygenAPI:
6
- def __init__(self, account, password):
7
  self.base_url = "https://api2.heygen.com/v1"
8
  self.account = account
9
  self.password = password
 
10
  self.session = None
11
  self.session_token = None
12
 
@@ -23,6 +24,7 @@ class HeygenAPI:
23
  "login_type": "email",
24
  "account": self.account,
25
  "password": self.password,
 
26
  }
27
 
28
  if not self.session:
 
3
 
4
 
5
  class HeygenAPI:
6
+ def __init__(self, account, password, token):
7
  self.base_url = "https://api2.heygen.com/v1"
8
  self.account = account
9
  self.password = password
10
+ self.token = token
11
  self.session = None
12
  self.session_token = None
13
 
 
24
  "login_type": "email",
25
  "account": self.account,
26
  "password": self.password,
27
+ "token": self.token,
28
  }
29
 
30
  if not self.session: