salmanmapkar commited on
Commit
efbaaad
1 Parent(s): d174120

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -19,9 +19,14 @@ SPEAKER_DICT = {}
19
  SPEAKERS = []
20
 
21
  def GetSpeaker(sp):
 
22
  if sp not in list(SPEAKER_DICT.keys):
23
- SPEAKER_DICT[sp] = SPEAKERS.pop(0)
24
- return SPEAKER_DICT[sp]
 
 
 
 
25
 
26
  def GenerateSpeakerDict(sp):
27
  SPEAKERS = [speaker.strip() for speaker in sp.split(',')]
 
19
  SPEAKERS = []
20
 
21
  def GetSpeaker(sp):
22
+ speaker = sp
23
  if sp not in list(SPEAKER_DICT.keys):
24
+ if len(SPEAKERS):
25
+ SPEAKER_DICT[sp] = SPEAKERS.pop(0)
26
+ speaker = SPEAKER_DICT[sp]
27
+ else:
28
+ speaker = SPEAKER_DICT[sp]
29
+ return speaker
30
 
31
  def GenerateSpeakerDict(sp):
32
  SPEAKERS = [speaker.strip() for speaker in sp.split(',')]