mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
Merge branch 'feat-api-speaker-reassignment' of github.com:Monadical-SAS/reflector into sara/feat-speaker-reassign
This commit is contained in:
@@ -251,6 +251,23 @@ class Transcript(BaseModel):
|
||||
url += f"?token={token}"
|
||||
return url
|
||||
|
||||
def find_empty_speaker(self) -> int:
|
||||
"""
|
||||
Find an empty speaker seat
|
||||
"""
|
||||
speakers = set(
|
||||
word.speaker
|
||||
for topic in self.topics
|
||||
for word in topic.words
|
||||
if word.speaker is not None
|
||||
)
|
||||
i = 0
|
||||
while True:
|
||||
if i not in speakers:
|
||||
return i
|
||||
i += 1
|
||||
raise Exception("No empty speaker found")
|
||||
|
||||
|
||||
class TranscriptController:
|
||||
async def get_all(
|
||||
|
||||
Reference in New Issue
Block a user