ghostai1 commited on
Commit
67a1108
·
verified ·
1 Parent(s): e94cef8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -25
README.md CHANGED
@@ -10,46 +10,57 @@ pinned: false
10
  license: apache-2.0
11
  short_description: text2speech+translate
12
  ---
13
- # 🌐💬 Instant Translator & Text-to-Speech
14
- [![HF Space](https://img.shields.io/badge/HuggingFace-Spaces-blue?logo=huggingface)](https://huggingface.co/spaces/<your-space>)
15
- [![Gradio UI](https://img.shields.io/badge/Gradio-5.31-green?logo=gradio)](https://gradio.app)
16
- [![Model Card](https://img.shields.io/badge/Models-Opus-MT%20%7C%20Coqui%20TTS-orange)](#models)
17
- [![License](https://img.shields.io/github/license/<you>/translator-tts)](LICENSE)
 
18
 
19
  ---
20
 
21
- ## 🚀 What this Space does
22
- Type a sentence in **English or Spanish**, pick the target language, click **Translate & Speak**
23
- and instantly hear the translated sentence spoken back to you.
24
- Runs 100 % on **free CPU** hardware (no GPUs, no paid APIs).
 
25
 
26
  ---
27
 
28
- ## ✨ Why you’ll love it
29
 
30
- | | Feature | Why it matters |
31
- |----|---------|----------------|
32
- | 🔄 | **Bidirectional translation** | English ↔ Spanish with top-tier Opus-MT models. |
33
- | 🔊 | **Natural speech** | Coqui TTS Tacotron2 voices for both languages. |
34
- | | **Zero latency overhead** | < 1 s average translation+TTS on free Space CPU. |
35
- | 🖱️ | **One-click UI** | Gradio Blocks layout; no install, no login needed. |
36
- | 💸 | **Cost-free** | All models < 200 MB each; fits HF free-tier RAM & disk. |
37
- | 🔧 | **Easily extensible** | Swap models to add new languages or voices in minutes. |
 
38
 
39
  ---
40
 
41
- ## 🖼️ Live Demo
42
 
43
- Open the Space &ndash; talk to it!
44
- `https://<username>-translator-tts.hf.space`
 
 
 
 
 
 
 
 
45
 
46
  ---
47
 
48
- ## 🏗️ Quick Start (Local Dev)
49
 
50
  ```bash
51
- git clone https://github.com/<you>/translator-tts.git
52
- cd translator-tts
53
- python -m venv venv && source venv/bin/activate
54
  pip install -r requirements.txt
55
  python app.py
 
10
  license: apache-2.0
11
  short_description: text2speech+translate
12
  ---
13
+
14
+ # 🌐💬 Translate & Speak + Session Log
15
+ [![Hugging Face Space](https://img.shields.io/badge/HuggingFace-Spaces-blue?logo=huggingface)](https://huggingface.co/spaces/your-username/translate-speak-log)
16
+ [![Gradio UI](https://img.shields.io/badge/Gradio-5.31.0-brightgreen?logo=gradio)](https://gradio.app)
17
+ [![Python](https://img.shields.io/badge/Python-3.10-yellow?logo=python)](https://www.python.org/)
18
+ [![License](https://img.shields.io/badge/License-MIT-lightgrey)](LICENSE)
19
 
20
  ---
21
 
22
+ ## 🚀 Overview
23
+ Harness the power of **real-time NLP**, **on-the-fly translation**, and **neural TTS** in one elegant, CPU-only pipeline. This Space transforms user text into spoken audio—any English or Spanish input gets auto-detected, translated, and voiced back—while maintaining a live session log for data-driven insights.
24
+
25
+ **Key AI buzzwords:**
26
+ > Natural Language Processing (NLP) • Neural Text-to-Speech • Zero-shot language detection • Real-time inference • Session state management • Cloud-native deployment • User-centric design • Cost-efficient CPU runtime
27
 
28
  ---
29
 
30
+ ## ✨ Features
31
 
32
+ | 🔑 Feature | 🔍 Description |
33
+ |--------------------------------|-------------------------------------------------------------------------------------------------------------|
34
+ | **🔄 Bidirectional Translation** | English ↔ Spanish via `deep-translator`’s GoogleTranslator (auto-detect source language) |
35
+ | **🗣️ Neural TTS** | High-fidelity speech generation with `gTTS` (Google Translate TTS) |
36
+ | **🕒 Real-Time Processing** | Sub-second response on free CPU tier—no GPUs, no paid APIs |
37
+ | **📊 Session Logging** | Data-driven UX: every input, translation, and audio event recorded in an interactive DataFrame |
38
+ | **🎨 Interactive UI** | Sleek Gradio Blocks interface with controls for text input, language selector, and playback |
39
+ | **🔧 Zero-Config Dev** | Drop-in `app.py` + `requirements.txt`—Spaces auto-builds and deploys |
40
+ | **💡 Extensible Architecture** | Modular pipelines—swap translators, TTS engines, or add analytics with minimal code changes |
41
 
42
  ---
43
 
44
+ ## 🏗️ Architecture & Workflow
45
 
46
+ 1. **User Input**
47
+ - Free-form text in any language (auto-detects English/Spanish).
48
+ 2. **Translation**
49
+ - `deep-translator` → Google Translate API wrapper → high-accuracy text conversion.
50
+ 3. **Text-to-Speech**
51
+ - `gTTS` → neural waveform synthesis → MP3 output.
52
+ 4. **Session Log**
53
+ - Maintains a rolling table of `[Input, Target Language, Translated Text]` for audit trails and usage analytics.
54
+ 5. **UI Rendering**
55
+ - Gradio Blocks orchestrates inputs, buttons, outputs, and state, delivering a seamless end-to-end experience.
56
 
57
  ---
58
 
59
+ ## 🛠️ Quick Start (Local Development)
60
 
61
  ```bash
62
+ git clone https://github.com/your-username/translate-speak-log.git
63
+ cd translate-speak-log
64
+ python3 -m venv venv && source venv/bin/activate
65
  pip install -r requirements.txt
66
  python app.py