A demonstration application showcasing Spring AI integration with OpenAI's Whisper model for speech-to-text transcription, built as a native GraalVM application with Vaadin frontend.
This repository serves as an educational resource for developers looking to understand:
- Spring AI Integration - How to leverage Spring AI to connect with OpenAI services
- GraalVM Native Images - Building efficient, fast-starting native applications
- Vaadin Web Applications - Creating interactive web UIs with Java
- Browser Audio APIs - Capturing and processing audio in a browser environment
- Spring Security - Implementing authentication in web applications
- DevOps Automation - GitHub Actions and Fly.io deployment integration
- Speech recording directly in the browser
- Real-time audio transcription using OpenAI's Whisper model
- Secure authentication flow
- Responsive UI built with Vaadin
- Optimized for performance with GraalVM native compilation
- Spring Boot 3 - Application framework
- Spring AI - AI service integration
- GraalVM - Native image compilation
- Vaadin - Web UI framework
- OpenAI Whisper - Audio transcription model
- GitHub Actions - CI/CD pipeline
- Fly.io - Cloud deployment
- Java 24
- Maven
- OpenAI API key
The application requires the following environment variables:
SPRING_AI_OPENAI_API_KEY=your_openai_api_key
APP_USER=your_username
APP_PASSWORD=your_password
- Clone the repository
- Set up environment variables
- Run the application:
./mvnw spring-boot:runFor native image compilation:
./mvnw -Pnative,production -B spring-boot:build-imageThe application follows a simple architecture:
- Frontend: Vaadin-based UI that captures audio using browser APIs
- Controller/Service Layer: Processes captured audio and communicates with OpenAI
- Integration Layer: Spring AI integration with OpenAI Whisper API
The application is configured for deployment to Fly.io using GitHub Actions. The workflow is defined in .github/workflows/build-deploy.yml.
This project is for educational purposes. Feel free to fork and experiment with the codebase to learn more about the technologies involved.