Skip to content

Proof of concept for a translation app using Large Language Models.

Notifications You must be signed in to change notification settings

mesarth/gpt-translate

Repository files navigation

expo sdk

GPT Translate

Proof of concept for a translation app using Large Language Models.

A React Native app that uses a Large Language Model (e.g. OpenAI's GPT-3) to translate text from one language to another. It uses OpenAI's Text-To-Speech API to read the translated text out loud. The app uses Expo and is written in TypeScript. A simple backend proxy is used to make the API calls to OpenAI. The backend is written in Node.js using Fastify.
Note: This app is a proof of concept and not intended for production use. I developed it to learn more about React Native and to experiment with LLMs.

Features

  • translate (almost) every language to every language
  • read the translated text out loud using different voices (powered by OpenAI's Text-To-Speech API)
  • save favorite translations
  • copy and share translations
  • light/dark mode
  • supports iOS and Android (no platform specific code)
translate dark-mode favorites settings

Setup

Backend

Create a .env file in the backend directory with the API_KEY for OpenAI. Have a look at the .env.example file.

App

Create a .env file in the root directory with the urls for the backend. Have a look at the .env.example file.

For iOS use the EXPO_PUBLIC_API_URL_IOS variable. For Android use the EXPO_PUBLIC_API_URL_ANDROID variable.

Run

Backend

Go to the backend directory.

npm install

npm run build && npm run start

App

npm install

npx expo start

Tech Stack

App:

Backend:

About

Proof of concept for a translation app using Large Language Models.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages