AI Voice Translator

December 18, 2024 ยท View on GitHub

A voice translator and transcriber app created in Electron with React and TypeScript image

Input/Output Audio Example: (Unmute to listen)


Features

Note: You must setup Voice Cloning to translate your own voice into any of the 32 supported languages.

  • Speech-To-Speech
    • Select your Input Language and Output Language
    • Start Recording from your microphone and once you Stop Recording, it will transcribe whatever you said, translate to the language of your choice, then output the translated voice.
  • Translate File
    • Select your Input Language and Output Language
    • Upload File locally, then it will also transcribe, translate, then output the translated voice.
  • Translate URL
    • Select your Input Language and Output Language
    • Enter the Audio URL, then click Submit URL and it will also transcribe, translate, then output the translated voice.
  • Text-To-Speech
    • Select your Input Language and Output Language
    • Enter any Text To Be Translated in the input, click Translate and it will translate, then output the translated voice.

Project Setup

API Keys

You will need to make an account and get an API for the following:

  • Deepgram
  • AssemblyAI
  • ElevenLabs
    • Link: https://elevenlabs.io/
    • Tier: Starter or higher for Voice Cloning ($5 USD/month). Free (10k credits) for generic voice generation
    • Note: You will need to copy your Voice ID for the .env variable if you do clone or want a different voice

.env Setup

cp .env.example .env

Then populate the following API Keys in your .env file:

  • VITE_DEEPGRAM_API_KEY
  • VITE_ASSEMBLYAI_API_KEY
  • VITE_ELEVENLABS_API_KEY
  • VITE_ELEVENLABS_VOICE_ID (Use one your IDs from ElevenLabs Voice Lab or it will default to Will)

Install

yarn

Development

yarn dev

Build

# For windows
yarn build:win

# For macOS
yarn build:mac

# For Linux
yarn build:linux