Skip to content

PolyglotTales is an AI-powered interactive story generator designed to help users learn new languages through immersive storytelling. Users can select a language, difficulty level, and story theme, and AI generates engaging narratives with interactive vocabulary challenges. Perfect for language learners who enjoy gamified education! πŸŒπŸ“š

Notifications You must be signed in to change notification settings

Nuraj250/PolyglotTales

Repository files navigation

🌍 PolyglotTales

PolyglotTales is a modern, AI-powered storytelling platform designed to help you learn new languages through immersive, interactive stories. Choose your language, set the difficulty, pick a theme and start the tale with your own words. The AI takes it from there.

PolyglotTales Demo

✨ Features

  • 🌐 Multilingual support: Spanish, French, German, Japanese
  • 🧠 Difficulty levels: Beginner, Intermediate, Advanced
  • 🎭 Story themes: Adventure, Romance, Sci-Fi, Mythology
  • ✍️ User-generated starting line for stories
  • πŸ”Š Text-to-speech (TTS) to hear your story
  • πŸ“š Vocabulary booster with extracted keywords
  • 🌫️ Glassmorphic UI with theme toggle
  • πŸ’‘ Powered by OpenAI (GPT-4 or DeepSeek) for storytelling

πŸ“Έ Preview

✨ Choose β†’ Type β†’ Read β†’ Listen β†’ Learn

PolyglotTales UI

πŸš€ Getting Started

1. Clone the repo

git clone https://github.com/Nuraj250/PolyglotTales.git
cd PolyglotTales

2. Install dependencies

npm install

3. Add your OpenAI API key

Create a .env.local file:

OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxx

βœ… You can also use DeepSeek or Gemini API by modifying /api/generate.ts

4. Run the app

npm run dev

Visit: http://localhost:3000


πŸ›  Tech Stack

  • Framework: Next.js 15 (Turbopack)
  • Styling: Tailwind CSS 4 (Glassmorphism)
  • Animations: Framer Motion
  • Language Model: OpenAI GPT-4 / DeepSeek
  • TTS: Native Web Speech API
  • Dark/Light Theme: Tailwind darkMode via class toggle

πŸ“ Project Structure

src/
β”‚
β”œβ”€β”€ components/       # Reusable UI (SelectorGroup, GlassButton)
β”œβ”€β”€ pages/            # Routes (index, story, api/generate)
β”œβ”€β”€ styles/           # Tailwind + global CSS
β”œβ”€β”€ utils/            # Vocabulary extractor
└── context/          # (Optional) global state

🌟 Contribution

Want to contribute a new language, theme, or TTS support? Open a PR or start a discussion β€” let’s grow this together!


πŸ“„ License

MIT Β© 2025 [Nuraj]

About

PolyglotTales is an AI-powered interactive story generator designed to help users learn new languages through immersive storytelling. Users can select a language, difficulty level, and story theme, and AI generates engaging narratives with interactive vocabulary challenges. Perfect for language learners who enjoy gamified education! πŸŒπŸ“š

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published