Published on February 3, 2025

ayaLang

What is ayaLang?

ayaLang is a Telegram bot designed to make language learning more engaging and interactive. Unlike traditional language learning apps, ayaLang acts as your virtual language partner, helping you practice through natural conversations powered by AI.

ayaLang demo

Features

Multi-Language Support

Currently, ayaLang supports nine languages:

  • 🇬🇧 English (US & British)
  • 🇯🇵 Japanese
  • 🇮🇹 Italian
  • 🇪🇸 Spanish
  • 🇫🇷 French
  • 🇮🇳 Hindi
  • 🇧🇷 Brazilian Portuguese
  • 🇨🇳 Mandarin Chinese

Interactive Learning

Each conversation includes:

  • Native language text
  • English translations (optional)
  • Romanization for languages like Japanese (optional)
  • Voice output using Kokoro TTS (Text To Speech)

Audio Samples

Audio quality will improve as the models we use get better. Here are some samples using Kokoro v1.0 with the best rated voices to date:

ayaLang Japanese demo
0:00Loading...
ayaLang British demo
0:00Loading...
ayaLang Italian demo
0:00Loading...
ayaLang French demo
0:00Loading...

The Tech Stack

ayaLang is built with:

  • Python and python-telegram-bot for the core functionality
  • aya-expanse for multilingual AI conversations
  • Kokoro TTS for natural-sounding voice generation

Getting Started

Self-Hosting Requirements

ayaLang currently needs to be self-hosted. Here's what you'll need:

Prerequisites

  • A Linux-based operating system (tested on Ubuntu 24.04) OR Windows Subsystem for Linux (WSL)
  • Python 3.11 or higher
  • A Telegram Bot Token (get one from the BotFather)
  • OpenAI API Key (or compatible model provider like ollama or tabbyAPI)
  • espeak-ng (for Kokoro TTS support)
  • The recommended model is aya-expanse from Cohere

Installation Steps

  1. Clone the repository:
git clone https://github.com/marcodsn/ayaLang.git
cd ayaLang
  1. Install system dependencies:
sudo apt-get update && sudo apt-get install -y espeak-ng
  1. Set up Python environment:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  1. Configure the bot:
  • Rename settings.example.json to settings.json
  • Add your Telegram bot token
  • Configure OpenAI settings (base URL, API key, engine)
  • Add allowed chat IDs for bot access (or set "whitelist" to "false", but be cautious)
  1. Launch the bot:
python main.py

Using the Bot

Now that the bot is up and running, here's how you can start learning:

  1. Start a chat with the bot on Telegram
  2. Use /start to begin
  3. Select your target language (e.g., /jp for Japanese)
  4. Start chatting!

What's Next

ayaLang is an open-source project, and I'm constantly working on improvements. Future updates might include:

  • More base languages (currently, only English is supported as the base language)
  • More languages and dialects (as models become available)
  • Community contributions

Want to contribute or learn more? Check out the GitHub repository.

License

ayaLang is licensed under the Apache License, Version 2.0. This means you can:

  • Use the software commercially
  • Modify the source code
  • Distribute your modifications
  • Patent claims
  • Private use

The full license text is available at Apache License 2.0.