Skip to content

pumpuni07/Babel-Fish-AI-Voice-Translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐟 Babel Fish — Voice Translator

A full-stack voice translation assistant powered by IBM Watsonx, Watson Speech-to-Text, and Watson Text-to-Speech. Speak or type in English and receive a spoken translation back.


Files

config.py          ← EDIT THIS FIRST — all credentials and settings live here
server.py          ← Flask backend (3 routes)
worker.py          ← STT / TTS / Watsonx functions
index.html         ← Frontend UI (self-contained — CSS & JS embedded)
requirements.txt   ← Python dependencies
.gitignore
README.md

Setup

1. Install dependencies

python3 -m venv my_env
source my_env/bin/activate        # Windows: my_env\Scripts\activate
pip install -r requirements.txt

2. Edit config.py

Open config.py and fill in your own values:

WATSONX_API_KEY    = "YOUR_WATSONX_API_KEY"   # IBM Cloud IAM API key
WATSONX_PROJECT_ID = "YOUR_PROJECT_ID"         # Watsonx.ai project ID
STT_BASE_URL       = "https://..."             # Your Watson STT endpoint
TTS_BASE_URL       = "https://..."             # Your Watson TTS endpoint
TARGET_LANGUAGE    = "Spanish"                 # Change translation target here

Where to get credentials:

3. Run

python server.py

Open http://127.0.0.1:8000 in your browser.


IBM Skills Network CloudIDE

If you are running inside the IBM Skills Network CloudIDE, the default endpoint values in config.py already work — you only need to set WATSONX_API_KEY and WATSONX_PROJECT_ID, or leave PROJECT_ID = "skills-network" as-is if the environment has pre-authorised access.


Changing the Target Language

In config.py:

TARGET_LANGUAGE = "French"   # or "German", "Arabic", "Mandarin", etc.

Then select a matching voice from the dropdown in the UI.


Available TTS Voices

Voice ID Language Gender
en-US_OliviaV3Voice US English Female
en-US_MichaelV3Voice US English Male
en-GB_CharlotteV3Voice British English Female
es-ES_EnriqueV3Voice Castilian Spanish Male
es-LA_SofiaV3Voice Latin American Spanish Female
fr-FR_NicolasV3Voice French Male
de-DE_DieterV3Voice German Male

List all available voices:

curl https://<your-tts-endpoint>/text-to-speech/api/v1/voices

License

Apache 2.0

About

Voice translation app: IBM Watson Speech-to-Text and Text-to-Speech with an LLM translation layer, served via Flask.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors