add a init state

This commit is contained in:
2025-03-13 14:58:03 +01:00
parent 9addb8bde1
commit 9315a2098d
2 changed files with 3 additions and 0 deletions
@@ -81,6 +81,8 @@ async def make_announcement(text: str, ep_group: EndpointGroup):
# Initialize all endpoints in the group if they were not initalized before
for endpoint in ep_group.endpoints:
ep_group.current_state = AnnouncementStates.INIT
endpoints_db.update_group(ep_group.id, ep_group)
init_endpoint(endpoint, ep_group.languages)
# Translate the text for each language
@@ -9,6 +9,7 @@ from pydantic import BaseModel
class AnnouncementStates(Enum):
IDLE = 0
INIT = 0.1
TRANSLATING = 0.2
GENERATING_VOICE = 0.4
ROUTING = 0.6