Bgk Injector SqLi commited on
Commit
94efae4
·
1 Parent(s): 9df0966

upda requirment

Browse files
Files changed (2) hide show
  1. README copy.md +91 -0
  2. requirements.txt +3 -0
README copy.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Wami - Dioula STT & TTS API
3
+ emoji: 🎙️
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: docker
7
+ app_port: 7860
8
+ ---
9
+
10
+ # Wami - API Dioula STT & TTS
11
+
12
+ API de reconnaissance vocale (Speech-to-Text) et synthèse vocale (Text-to-Speech) en langue Dioula.
13
+
14
+ ## Utilisation
15
+
16
+ ### Endpoints disponibles
17
+
18
+ #### 1. Speech-to-Text (STT)
19
+
20
+ Transcrit un fichier audio en texte Dioula.
21
+
22
+ ```bash
23
+ curl -X POST https://votre-space-name.hf.space/api/stt \
24
+ -F "audio=@recording.wav"
25
+ ```
26
+
27
+ **Réponse:**
28
+ ```json
29
+ {
30
+ "transcription": "texte transcrit en dioula"
31
+ }
32
+ ```
33
+
34
+ #### 2. Text-to-Speech (TTS)
35
+
36
+ Génère un audio en Dioula depuis du texte.
37
+
38
+ ```bash
39
+ curl -X POST https://votre-space-name.hf.space/api/tts \
40
+ -F "text=na an be do minkɛ" \
41
+ -o output.wav
42
+ ```
43
+
44
+ **Réponse:** Fichier audio WAV
45
+
46
+ #### 3. Health Check
47
+
48
+ Vérifie le statut de l'API.
49
+
50
+ ```bash
51
+ curl https://votre-space-name.hf.space/health
52
+ ```
53
+
54
+ **Réponse:**
55
+ ```json
56
+ {
57
+ "status": "healthy",
58
+ "device": "cuda",
59
+ "models_loaded": {
60
+ "stt": true,
61
+ "tts": true
62
+ }
63
+ }
64
+ ```
65
+
66
+ ## 📖 Documentation interactive
67
+
68
+ - **Swagger UI:** `https://votre-space-name.hf.space/docs`
69
+ - **ReDoc:** `https://votre-space-name.hf.space/redoc`
70
+
71
+ ## 🔧 Modèles utilisés
72
+
73
+ - **STT:** [facebook/mms-1b-all](https://huggingface.co/facebook/mms-1b-all) (adapter Dioula)
74
+ - **TTS:** [facebook/mms-tts-dyu](https://huggingface.co/facebook/mms-tts-dyu)
75
+
76
+ ## 💻 Déploiement local
77
+
78
+ ```bash
79
+ pip install -r requirements.txt
80
+ python app.py
81
+ ```
82
+
83
+ Ouvrez [http://localhost:7860](http://localhost:7860)
84
+
85
+ ## 🌍 À propos du Dioula
86
+
87
+ Le Dioula (code langue: `dyu`) est une langue mandée parlée principalement en Côte d'Ivoire, au Burkina Faso et au Mali.
88
+
89
+ ## 📝 Licence
90
+
91
+ Les modèles utilisés sont sous licence Apache 2.0. Voir les pages des modèles pour plus de détails.
requirements.txt CHANGED
@@ -6,3 +6,6 @@ soundfile>=0.12.0
6
  torch>=2.5.0
7
  torchaudio>=2.5.0
8
  transformers>=4.40.0
 
 
 
 
6
  torch>=2.5.0
7
  torchaudio>=2.5.0
8
  transformers>=4.40.0
9
+ torchvision
10
+ humanfriendly
11
+ scipy