Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,10 +1,39 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
-
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Talklas 2
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
+
app_port: 8000
|
| 8 |
+
health_check_path: /health
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Talklas API
|
| 12 |
+
|
| 13 |
+
This FastAPI app is deployed on Hugging Face Spaces for audio transcription, translation, and text-to-speech (TTS). The model loads all at once and includes a feature for detecting inappropriate language. It includes the following endpoints:
|
| 14 |
+
|
| 15 |
+
- `/`: Returns a simple health check response.
|
| 16 |
+
- `/health`: Health check endpoint for Hugging Face Spaces.
|
| 17 |
+
- `/update-languages`: Updates the source and target languages for STT and TTS models.
|
| 18 |
+
- `/translate-text`: Translates text and converts it to speech.
|
| 19 |
+
- `/translate-audio`: Transcribes audio, translates the text, and converts the translated text to speech. Includes speech detection to handle silent audio gracefully.
|
| 20 |
+
|
| 21 |
+
## Features
|
| 22 |
+
|
| 23 |
+
- **Speech Detection**: The `/translate-audio` endpoint detects if the audio is silent (no speech) and returns a user-friendly response.
|
| 24 |
+
- **Transcription (STT)**: Uses MMS or Whisper models to transcribe audio.
|
| 25 |
+
- **Translation (MT)**: Uses the NLLB-200 model to translate text between supported languages.
|
| 26 |
+
- **Text-to-Speech (TTS)**: Uses MMS-TTS models to convert translated text to speech.
|
| 27 |
+
|
| 28 |
+
## Supported Languages
|
| 29 |
+
|
| 30 |
+
- English
|
| 31 |
+
- Tagalog
|
| 32 |
+
- Cebuano
|
| 33 |
+
- Ilocano
|
| 34 |
+
- Waray
|
| 35 |
+
- Pangasinan
|
| 36 |
+
|
| 37 |
+
## Deployment
|
| 38 |
+
|
| 39 |
+
This app uses a `Dockerfile` to deploy a FastAPI app with Uvicorn. The health check path is set to `/health` to ensure Hugging Face Spaces can verify the app is running.
|