Vidya Vaani is a scalable, real-time audio captioning system designed to transcribe audio in real-time, provide accurate captions, and offer multilingual support, ensuring data privacy and compliance with industry standards.
- Requirements
- Getting Started
- Cloning the Repository
- Setting Up Environment Variables
- Building and Running the Application
- API Endpoints
- Kafka Integration
- Running Tests
- Go 1.21 or above
- Docker and Docker Compose
- Kafka (running via Docker)
This project uses Docker to manage dependencies and services, ensuring consistent environments for all developers.
- Open your terminal.
- Clone the repository:
git clone https://github.com/krishnaag23/vidya-vaani.git cd vidya-vaani
- Copy the example environment file to create your local
.envfile:cp .env.example .env
- Edit the
.envfile to configure your environment variables based on your local setup.
- Build and start the application using Docker Compose:
docker-compose up --build
- This command will start the API, PostgreSQL database, Zookeeper, and Kafka services.
- The application will be accessible at
http://localhost:8080.
- Health Check
- Endpoint:
GET /health - Description: Checks if the API is running.
- Response:
{ "status": "up" }
- Endpoint:
- Transcribe Audio
- Endpoint:
POST /transcribe - Description: Accepts audio data and returns the transcription.
- Request Body:
{ "audio_data": "<base64_binary_data>" } - Response:
{ "transcription": "The transcribed text" }
- Endpoint:
The application integrates with Kafka to produce transcription messages. This allows the application to send real-time data to other services.
- Kafka Setup: The Kafka service is included in the docker-compose.yml file, and it will run automatically when you execute docker-compose up.
- By default, the application communicates with Kafka through
localhost:9092. This can be changed in the Kafka producer initialization. - The transcription output is produced to the
transcription_topic.
You can run tests in your application by executing:
go test ./...