from fastapi import APIRouter, Depends, status

from app.deps import verify_internal_token
from app.schemas.helpers import TtsSynthesizeRequest, TtsSynthesizeResponse
from app.services.helpers import TtsService

router = APIRouter(prefix="/tts")
_service = TtsService()


@router.post(
    "/synthesize",
    response_model=TtsSynthesizeResponse,
    status_code=status.HTTP_200_OK,
    summary="AI Interviewer Text-to-Speech",
    dependencies=[Depends(verify_internal_token)],
)
async def synthesize(payload: TtsSynthesizeRequest) -> TtsSynthesizeResponse:
    return await _service.synthesize(payload)
