A static web application for language learning with voice interaction capabilities. This application provides a chat interface where users can practice their language skills by speaking or typing, and receive responses both in text and audio format.
- Voice input support with real-time recording
- Text input for typing messages
- Chat interface with message history
- Text-to-Speech playback for assistant responses
- Modern, responsive UI design
- Ready for integration with external STT, TTS, and LLM services
- Node.js 18.0.0 or later
- npm 9.0.0 or later
- Clone the repository:
git clone https://github.com/yourusername/voice-tutor.git
cd voice-tutor
- Install dependencies:
npm install
-
Set up environment variables:
- Create a
.env.local
file in the root directory - Add your Groq API key:
NEXT_PUBLIC_GROQ_API_KEY=your_groq_api_key_here
- Get your API key from Groq's website
- Create a
-
Start the development server:
npm run dev
- Open http://localhost:3000 in your browser.
To create a production build:
npm run build
The static files will be generated in the out
directory, ready to be deployed to GitHub Pages or any static hosting service.
The application is designed to work with external services. To integrate with your services:
-
Speech-to-Text (STT):
- Modify the
simulateSTT
function insrc/components/ChatInterface.tsx
- Replace the simulation with actual API calls to your STT service
- Modify the
-
Language Model (LLM):
- Update the
handleUserMessage
function insrc/components/ChatInterface.tsx
- Implement the actual API call to your LLM service
- Update the
-
Text-to-Speech (TTS):
- In the
handleUserMessage
function, replace the simulated audio URL - Implement the actual API call to your TTS service
- In the
MIT