Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

Building an AI-Powered Language Learning App: Learning From Two AI Chatting

A step-by-step tutorial on creating a dual-chatbot language learning app with Langchain, OpenAI, gTTS, and Streamlit

25 min readJun 26, 2023

--

Press enter or click to view image in full size
DALL-E Prompt: two friendly robots talking with each other.

When I first began learning a new language, I like to buy those “conversational dialogues” books. I find those books very useful as they help me understand how the language worked — not just the grammar and vocabulary, but also how people really used it in day-to-day life.

Now with the rise of large language models (LLMs), a thought occurred to me: could I replicate these language-learning books in a more interactive, dynamic, and scalable format? Could I utilize LLM to create a tool that generates fresh, on-demand conversations for language learners?

This thought inspired the project I would like to share with you today — an AI-powered language learning app, where learners can observe and learn from two AI chatbots engaged in either a user-defined conversation or a debate.

Regarding the employed tech stack, I have used Langchain, OpenAI API, gTTS, and Streamlit to create the application where users can define the roles, scenarios, or debate topics, and let the AI generate the content.

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Shuai Guo, PhD
Shuai Guo, PhD

Written by Shuai Guo, PhD

Industrial AI researcher working with physics, data, and machine learning to solve real-world problems in engineering, security, and intelligent systems.