This project implements a real-time speech-to-text transcription service with optional translation capabilities using React, Next.js, Deepgram for speech recognition, and Groq for translation.
- Real-time speech-to-text transcription
- Optional automatic translation to English
- Toggle switch for enabling/disabling translation
- React
- Next.js
- Deepgram API for speech recognition
- Groq API for translation
- Framer Motion for animations
- Tailwind CSS for styling
- Clone the repository
- Install dependencies:
pnpm install
- Set up environment variables:
DEEPGRAM_API_KEY
: Your Deepgram API keyGROQ_API_KEY
: Your Groq API key
- Run the development server:
pnpm run dev
/api/authenticate
: Provides the Deepgram API key to the client/api/translate
: Handles text translation using the Groq API
- Start the application
- Grant microphone access when prompted
- Speak into the microphone to see real-time transcription
- Toggle the switch to enable/disable automatic translation to English
- The transcription is set up for Spanish (
es-ES
) by default. Modify the language parameter inconnectToDeepgram
to change the input language. - The translation service uses Groq's
gemma-7b-it
model for English translation.