NCAkit / modules /quiz_reel /__init__.py
ismdrobiul489's picture
Add Quiz Reel module with TTS, frame generation, and video composition
1574979
raw
history blame contribute delete
873 Bytes
"""
Quiz Reel Module
Generates quiz videos with TTS, options, and answer reveal.
"""
import logging
from fastapi import FastAPI
logger = logging.getLogger(__name__)
# Module metadata
MODULE_NAME = "quiz_reel"
MODULE_PREFIX = "/api/quiz"
MODULE_DESCRIPTION = "Quiz video generation with TTS and animated reveals"
def register(app: FastAPI, config) -> None:
"""Register quiz_reel module with the app"""
from .router import router, set_app_reference
try:
# Set app reference for accessing shared services
set_app_reference(app)
# Include router
app.include_router(router, prefix=MODULE_PREFIX, tags=["Quiz Reel"])
logger.info(f"✅ Quiz Reel module registered at {MODULE_PREFIX}")
except Exception as e:
logger.error(f"Failed to register quiz_reel module: {e}")
raise