Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,78 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: OCM
|
| 3 |
+
emoji: 🎵
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: pink
|
| 6 |
+
sdk: static
|
| 7 |
+
pinned: true
|
| 8 |
+
license: mit
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# 🎵 OCM - AI Music Creator
|
| 12 |
+
|
| 13 |
+
Application web pour générer de la musique avec l'IA en utilisant MusicGen.
|
| 14 |
+
|
| 15 |
+
## 🔗 Liens
|
| 16 |
+
- 🌐 Application : [fmenguy.fr/ocm](https://fmenguy.fr/ocm)
|
| 17 |
+
- 📚 Documentation : Voir ci-dessous
|
| 18 |
+
- 🤖 Modèle utilisé : [facebook/musicgen-medium](https://huggingface.co/facebook/musicgen-medium)
|
| 19 |
+
|
| 20 |
+
## 🎯 À propos
|
| 21 |
+
|
| 22 |
+
OCM utilise le modèle MusicGen de Meta AI pour générer de la musique instrumentale à partir de descriptions textuelles.
|
| 23 |
+
|
| 24 |
+
### Modèle
|
| 25 |
+
- **Base** : facebook/musicgen-medium (1.5B paramètres)
|
| 26 |
+
- **Type** : Text-to-Music
|
| 27 |
+
- **Sortie** : Audio 32kHz mono
|
| 28 |
+
- **Durée max** : 30 secondes
|
| 29 |
+
|
| 30 |
+
## 🎼 Exemples de prompts
|
| 31 |
+
|
| 32 |
+
### Rock
|
| 33 |
+
Energetic rock song with distorted electric guitar, powerful drums, 120 bpm
|
| 34 |
+
|
| 35 |
+
### Jazz
|
| 36 |
+
Smooth jazz with mellow saxophone, piano chords, 95 bpm, late-night vibe
|
| 37 |
+
|
| 38 |
+
### Électronique
|
| 39 |
+
Upbeat electronic dance music with pulsing synths, 128 bpm, festival anthem
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
## 🛠️ Utilisation
|
| 43 |
+
|
| 44 |
+
### Via l'interface web
|
| 45 |
+
Rendez-vous sur [fmenguy.fr/ocm](https://fmenguy.fr/ocm)
|
| 46 |
+
|
| 47 |
+
### Via API Hugging Face
|
| 48 |
+
```python
|
| 49 |
+
import requests
|
| 50 |
+
|
| 51 |
+
API_URL = "https://api-inference.huggingface.co/models/facebook/musicgen-medium"
|
| 52 |
+
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
|
| 53 |
+
|
| 54 |
+
def generate_music(prompt):
|
| 55 |
+
response = requests.post(API_URL,
|
| 56 |
+
headers=headers,
|
| 57 |
+
json={"inputs": prompt})
|
| 58 |
+
return response.content
|
| 59 |
+
|
| 60 |
+
audio = generate_music("Calm piano music, peaceful, 80 bpm")
|
| 61 |
+
with open("output.wav", "wb") as f:
|
| 62 |
+
f.write(audio)
|
| 63 |
+
|
| 64 |
+
📊 Statistiques
|
| 65 |
+
|
| 66 |
+
✅ Modèle stable et testé
|
| 67 |
+
🎵 Supporte tous genres musicaux
|
| 68 |
+
⚡ Génération en 1-3 minutes
|
| 69 |
+
🆓 Gratuit avec limitations API
|
| 70 |
+
|
| 71 |
+
🤝 Crédits
|
| 72 |
+
|
| 73 |
+
Modèle : [MusicGen by Meta AI](https://ai.meta.com/blog/audiocraft-musicgen-audiogen-encodec-generative-ai-audio/)
|
| 74 |
+
Interface : OCM by fmenguy
|
| 75 |
+
Hébergement : Hugging Face
|
| 76 |
+
|
| 77 |
+
📄 Licence
|
| 78 |
+
MIT License
|