Politeness-Engine-API-Backend

🌐 Politeness-Engine-API-Backend

πŸ“Œ Overview

The backend of Speech Refiner is a Flask-based REST API designed to process audio files uploaded from the frontend application. It performs two main tasks: transcribing the speech from audio and refining the transcribed text using a Large Language Model (LLM). The backend is designed for modularity, scalability, and secure integration with production-ready platforms.

🧱 Architecture Overview

The backend system consists of three primary files:

πŸ”— Endpoint Specification

🚦 Rate Limiting

To ensure fair usage and prevent abuse, the backend implements rate limiting based on the client’s IP address. This is handled using the Flask-Limiter package.

🧠 LLM API Integration

The backend interacts with a Groq-hosted Large Language Model (LLM) to enhance or summarize the transcribed text.

πŸš€ Deployment Overview

πŸ“¦ Dependency List

The backend depends on the following Python libraries:

ο»ΏFlask==3.1.1
flask-cors==6.0.0
Flask-Limiter==3.11.0
numpy==2.0.2
redis>=3.0
requests==2.32.3
scipy==1.13.1
soundfile==0.13.1
SpeechRecognition==3.14.3
gunicorn

Final Notes