Commit
·
c7d247a
1
Parent(s):
0964371
Add demos to readme
Browse files
README.md
CHANGED
|
@@ -10,4 +10,45 @@ pinned: false
|
|
| 10 |
short_description: Convert text/image/audio/video from src language to English
|
| 11 |
---
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 10 |
short_description: Convert text/image/audio/video from src language to English
|
| 11 |
---
|
| 12 |
|
| 13 |
+
The space consists of 3/4 parts: -
|
| 14 |
+
|
| 15 |
+
- Text translator - Input (Text), Output (Translated text in English)
|
| 16 |
+
- Image translator - Input (Image with any text), Output (English Translated text version of the text in the image)
|
| 17 |
+
- Audio translator - Input (Audio in any language), Output (English Translated text version of the audio)
|
| 18 |
+
- Video translator - Input (Video), Output (English Translated text version of the audio) [Not yet implemented]
|
| 19 |
+
********************************************************
|
| 20 |
+
|
| 21 |
+
Demo
|
| 22 |
+
|
| 23 |
+
********
|
| 24 |
+
**Text translator**
|
| 25 |
+
- Simple `deep-translator` library usage.
|
| 26 |
+

|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
|
| 34 |
+
***********
|
| 35 |
+
**Image translator**
|
| 36 |
+
- Best works with simple fonts. Performance detoriates with decorative fonts.
|
| 37 |
+
- For now, you have to choose the language, choosing "English" can work for almost all Latin-script languages like (Spanish, Romanian etc.)
|
| 38 |
+
- Using `pytesseract` model for image-to-text conversion. It's installation is a bit complicated. [Follow this link for installation](https://stackoverflow.com/a/52231794/17820006)
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+
*************
|
| 47 |
+
**Audio translator**
|
| 48 |
+
- Since I am on a free-tier space, the inference takes a lot of time (1000 seconds for 10 seconds of audio)
|
| 49 |
+
- If one has HuggingFace pro, he/she can get a GPU and get reasonable inference time. But for now, this is just a demo.
|
| 50 |
+
- If you have an OpenAPI key, you can use whisper speech-to-text model via API call. But since I don't have it, I used the whisper library method, where you have to take care of the inference hardware yourself.
|
| 51 |
+

|
| 52 |
+
- Here is a 10 seconds translation of the famous Russian song [Kukushka](https://youtu.be/fuPX8mjeb-E?si=RSlOLLfVnt52UUGG)
|
| 53 |
+
|
| 54 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|