Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
A newer version of the Gradio SDK is available:
5.42.0
metadata
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
- 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
) - Select the target language from the dropdown menu.
- 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
andWEBSHARE_PROXY_PW
.