Spaces:
Running
Running
| title: YouTube Translator and Speaker | |
| emoji: ๐ | |
| colorFrom: yellow | |
| colorTo: blue | |
| sdk: gradio | |
| sdk_version: 5.28.0 | |
| app_file: app.py | |
| pinned: false | |
| # YouTube Translator and Speaker | |
| This HuggingFace Space application allows you to get the translated transcript and speech for a given YouTube video. | |
| ## How to Use | |
| 1. Enter the YouTube Video ID in the provided text box. | |
| (The video ID is the unique string of characters in the YouTube video URL after `v=`, e.g., `dQw4w9WgXcQ`) | |
| 2. Select the target language from the dropdown menu. | |
| 3. The translated text will appear in the 'Translated Text' box, and the translated speech will play automatically. | |
| ## Supported Languages | |
| - Arabic (ar) | |
| - French (fr) | |
| - Hausa (ha) | |
| - Afghan Persian / Dari (fa) | |
| - Pashto (ps) | |
| ## Notes | |
| - Translation for Arabic and French uses Helsinki-NLP models. | |
| - Translation for Hausa, Afghan Persian, and Pashto uses the Facebook NLLB-200 model. | |
| - Speech generation for Arabic and French uses gTTS. | |
| - Speech generation for Hausa, Afghan Persian, and Pashto uses the ElevenLabs API. An ElevenLabs API key is required as a Space secret named `ELEVENLABS_API_KEY` for speech to work in these languages. | |
| - Proxy settings for YouTube transcript retrieval can be configured using Space secrets named `WEBSHARE_PROXY_UN` and `WEBSHARE_PROXY_PW`. | |