(Spring Boot 2.7.14 • Java 8 • MySQL • HTML UI)
An AI-powered web application that allows users to upload PDF, Audio, or Video files and interact with them using natural language questions.
The system extracts text from documents, converts speech to text for audio/video files, generates summaries, and answers questions using an AI model.
✅ Upload PDF, Audio, Video files ✅ Automatic text extraction ✅ Speech-to-Text using Vosk (offline) ✅ AI Question Answering ✅ Document Summarization ✅ Timestamp extraction for media ✅ Media streaming support ✅ JWT Authentication ✅ Chat history saved in database
- Java 8
- Spring Boot 2.7.14
- Spring Security + JWT
- Hibernate / JPA
- MySQL
- HTML
- CSS
- JavaScript
- Groq / OpenAI API
- Vosk Speech Recognition
- JAVE Audio Converter
CREATE DATABASE Ai_chat;Edit:
src/main/resources/application.yml
Update:
spring:
datasource:
url: jdbc:mysql://localhost:3306/Ai_chat
username: root
password: YOUR_PASSWORD
openai:
api:
key: sk-YOUR_API_KEYRun:
AiChatApplication.java → Run as Spring Boot App
mvn spring-boot:runhttp://localhost:8080
| Method | Endpoint | Body |
|---|---|---|
| POST | /api/auth/register |
{ "username":"","email":"","password":"" } |
| POST | /api/auth/login |
{ "username":"","password":"" } |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/documents/upload |
Upload file |
| GET | /api/documents |
List documents |
| GET | /api/documents/{id} |
Get document |
| GET | /api/documents/{id}/summary |
Get summary |
| GET | /api/documents/{id}/timestamps |
Get timestamps |
| GET | /api/documents/{id}/stream |
Stream media |
| DELETE | /api/documents/{id} |
Delete document |
| Method | Endpoint | Body |
|---|---|---|
| POST | /api/chat/ask |
{ "documentId":1, "question":"What is this about?" } |
| GET | /api/chat/history/{documentId} |
Chat history |
Open:
http://localhost:8080/swagger-ui.html
mvn clean test
mvn jacoco:reportCoverage:
target/site/jacoco/index.html
docker-compose up --buildsrc/main/java/com/aichat
├── controller
├── service
├── repository
├── entity
├── security
src/main/resources
├── static (HTML frontend)
├── application.yml
- User uploads file
- Backend detects file type
- PDF → text extracted
- Audio/Video → converted → speech-to-text
- Transcript saved in MySQL
- User asks question
- Transcript + question sent to AI
- AI response returned
Vishal Pawar Java Full-Stack Developer
- MySQL must be running
- Vosk model must be placed in project root
- Requires valid AI API key
For educational / assessment submission.



