Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
5.42.0
metadata
title: Speechtranslate
emoji: ๐
colorFrom: red
colorTo: yellow
sdk: gradio
sdk_version: 5.31.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: text2speech+translate
๐๐ฌ Translate & Speak + Session Log
๐ Overview
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.
Key AI buzzwords:
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
โจ Features
๐ Feature | ๐ Description |
---|---|
๐ Bidirectional Translation | English โ Spanish via deep-translator โs GoogleTranslator (auto-detect source language) |
๐ฃ๏ธ Neural TTS | High-fidelity speech generation with gTTS (Google Translate TTS) |
๐ Real-Time Processing | Sub-second response on free CPU tierโno GPUs, no paid APIs |
๐ Session Logging | Data-driven UX: every input, translation, and audio event recorded in an interactive DataFrame |
๐จ Interactive UI | Sleek Gradio Blocks interface with controls for text input, language selector, and playback |
๐ง Zero-Config Dev | Drop-in app.py + requirements.txt โSpaces auto-builds and deploys |
๐ก Extensible Architecture | Modular pipelinesโswap translators, TTS engines, or add analytics with minimal code changes |
๐๏ธ Architecture & Workflow
- User Input
- Free-form text in any language (auto-detects English/Spanish).
- Translation
deep-translator
โ Google Translate API wrapper โ high-accuracy text conversion.
- Text-to-Speech
gTTS
โ neural waveform synthesis โ MP3 output.
- Session Log
- Maintains a rolling table of
[Input, Target Language, Translated Text]
for audit trails and usage analytics.
- Maintains a rolling table of
- UI Rendering
- Gradio Blocks orchestrates inputs, buttons, outputs, and state, delivering a seamless end-to-end experience.
๐ ๏ธ Quick Start (Local Development)
git clone https://github.com/your-username/translate-speak-log.git
cd translate-speak-log
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python app.py