Parakeet is a Flutter app for generating and practicing AI-powered language-learning dialogues. It uses Cloud Functions (Python) to call LLMs and synthesize audio via Google Cloud Text-to-Speech, OpenAI TTS, and ElevenLabs.
- AI-generated dialogues with adjustable topic, level, and length
- Multi-provider TTS: Google, OpenAI, ElevenLabs
- Firebase-backed storage for generated content and audio
- Mobile-first Flutter app with web support
lib/– Flutter application code (screens, services, widgets, utils)functions/– Cloud Functions (Python) for lesson generation and audiofunctions_plot_twist/– Separate Cloud Functions (Python) codebasepayment_verification_backend/– Node/TypeScript backend for purchase verificationassets/,narrator_audio/– Static assets and pre-generated audiothird_party/vosk_flutter/– Vosk speech components (vendor code)data_analytics/– Optional analytics utilities and scripts
- Flutter SDK and a recent Dart toolchain
- Firebase CLI (
firebase-tools) and a Firebase project - Python 3.10+ for Python Cloud Functions
- Node.js 18+ for
payment_verification_backend - Google Cloud project with Text-to-Speech API enabled
Some backends expect secrets via environment variables. Create a .env in each Python functions codebase or export env vars in your shell/session.
Required variables (by feature):
- OpenAI (used in
functions/):OPEN_AI_API_KEY
- ElevenLabs (used in
functions/):ELEVENLABS_API_KEY
- Google Cloud Text-to-Speech (used in
functions/):GOOGLE_APPLICATION_CREDENTIALSpointing to a service account JSON with TTS access
- Plot Twist function (used in
functions_plot_twist/):KOFI_TOKEN(optional if you use Ko‑fi webhook verification)
Install dependencies and run:
flutter pub get
flutter runRelease builds:
# Android APK
flutter build apk --release
# Android App Bundle (recommended for Play Store)
flutter build appbundle --obfuscate --split-debug-info=build/app/outputs/symbols
# iOS IPA (upload via Transporter)
flutter build ipa --obfuscate --split-debug-info=build/app/outputs/symbols
# Web
flutter build webTroubleshooting:
flutter cleanThis repo contains two Python Cloud Functions codebases: the main functions/ and functions_plot_twist/ (declared in firebase.json as codebase plot_twist).
Install dependencies (example for functions/):
cd functions
pip install -r requirements.txtKey HTTP functions in functions/main.py:
first_API_calls– creates a dialogue plan and reserves creditssecond_API_calls– generates detailed lesson content and audiodelete_audio_file– deletes generated audio for a lesson/documentgenerate_nickname_audio– creates a nickname audio file for a usergenerate_lesson_topic– suggests a lesson topic given category/wordstranslate_keywords– translates keywords into target languagesuggest_custom_lesson– suggests custom lesson ideas
Deploy all Python functions for the default codebase:
firebase deploy --only functionsDeploy specific functions:
firebase deploy --only functions:first_API_calls,functions:second_API_callsRun one function locally for testing (requires functions-framework):
functions-framework --target second_API_calls --debugThe secondary codebase functions_plot_twist/ can be deployed via Firebase (see firebase.json) or directly with gcloud. Example with gcloud:
gcloud functions deploy handle_kofi_donation \
--region=europe-west1 \
--gen2 \
--set-env-vars KOFI_TOKEN=your_kofi_token_here \
--source functions_plot_twist/The payment_verification_backend/ directory contains a separate backend. Common workflow:
cd payment_verification_backend
npm install
npm run build # if applicable
npm run deploy # runs: firebase deploy --only functions- Useful commands live in
dev-cheatsheet.md(deploys, bundling, SHA-1, etc.) - Ensure your Firebase project is set:
firebase use <your-project> - For Google TTS, enable the API and provide credentials via
GOOGLE_APPLICATION_CREDENTIALS
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This repository does not currently include a license. All rights reserved.