Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.37.0
metadata
title: French Tutor
emoji: π
colorFrom: blue
colorTo: red
sdk: gradio
sdk_version: 4.31.0
app_file: app.py
pinned: false
secrets:
- MISTRAL_API_KEY
- GEMINI_API_KEY
- GROQ_API_KEY
π«π· French Conversation Tutor
This is a Gradio app for practicing French conversation through natural speech interaction with Mr. Mistral!
How it works:
- The app gives you a scenario and some helpful phrases.
- You record your response in French using your microphone.
- The AI tutor (Mr. Mistral) replies, and you have a short conversation (3 exchanges).
- At the end, you get a detailed analysis of your grammar, pronunciation, and vocabulary.
Tech Stack:
- Primary LLM: Mistral AI (mistral-large-latest)
- Fallback LLM: Google Gemini API (gemini-1.5-flash-latest)
- STT: Groq API (Whisper large-v3-turbo)
- TTS: Groq API (TTS-1 model)
- UI: Gradio
The app will show which LLM is being used in the interface. It prioritizes Mistral AI, but falls back to Google Gemini if Mistral is unavailable.
Features:
- π€ Speech-to-text transcription of French audio
- π Text-to-speech for AI tutor responses
- π¬ Natural conversation flow
- π Detailed analysis after 3 exchanges
- π² Random topic generation for variety
- π€ Model indicator showing which AI is responding
Setup:
Create a
.env
file with:MISTRAL_API_KEY=your_mistral_api_key GEMINI_API_KEY=your_gemini_api_key # Optional fallback GROQ_API_KEY=your_groq_api_key
Important: Never commit your
.env
file to version control!Install dependencies:
pip install -r requirements.txt
Test your API keys:
python test_api_keys.py
Run:
python app.py
For HuggingFace Spaces:
- Add
MISTRAL_API_KEY
,GEMINI_API_KEY
(optional), andGROQ_API_KEY
in the Space's Settings > Variables and secrets