Update README.md
Browse files
README.md
CHANGED
|
@@ -1,13 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
|
|
|
| 1 |
+
# ๐ต PiMusic3 โ The Pi Forge Music Player
|
| 2 |
+
|
| 3 |
+
> โThe spire hums, the waveform breathes โ and the Forge sings once more.โ
|
| 4 |
+
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
### ๐ Overview
|
| 8 |
+
|
| 9 |
+
**PiMusic3** is a **multi-modal sovereign audio system** forged in the **Sovereign Canticle Forge** ecosystem.
|
| 10 |
+
It merges **MusicGen**, **Whisper**, and **DistilBERT** into a single, ethical creative interface built with **Gradio**.
|
| 11 |
+
|
| 12 |
+
PiMusic3 can:
|
| 13 |
+
- ๐งฌ **Generate music** from natural language prompts (via `facebook/musicgen-small`)
|
| 14 |
+
- ๐๏ธ **Transcribe speech** from microphone or uploaded audio (via `openai/whisper-base`)
|
| 15 |
+
- ๐ฌ **Analyze emotion and tone** using a distilled sentiment model
|
| 16 |
+
|
| 17 |
+
It automatically detects whether youโre running locally or in the cloud:
|
| 18 |
+
- **Local builds** use **Audiocraftโs native MusicGen**
|
| 19 |
+
- **Cloud builds (Spaces)** use the **Transformers pipeline fallback**
|
| 20 |
+
|
| 21 |
---
|
| 22 |
+
|
| 23 |
+
### ๐ ๏ธ Quick Start
|
| 24 |
+
|
| 25 |
+
1. **Run the Space** โ [๐ Launch on Hugging Face](https://huggingface.co/spaces/onenoly11/PiMusic3)
|
| 26 |
+
2. Wait for initialization (~30โ60 s)
|
| 27 |
+
3. Use the tabs to explore:
|
| 28 |
+
- **๐ผ MusicGen** โ describe your sound and listen
|
| 29 |
+
- **๐ Whisper Transcribe** โ record or upload speech
|
| 30 |
+
- **๐ Sentiment Analysis** โ interpret emotional tone
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
### โ๏ธ Architecture
|
| 35 |
+
|
| 36 |
+
| Module | Model | Purpose |
|
| 37 |
+
|:--|:--|:--|
|
| 38 |
+
| `MusicGen` | `facebook/musicgen-small` | Text โ audio generation |
|
| 39 |
+
| `Whisper` | `openai/whisper-base` | Speech-to-text transcription |
|
| 40 |
+
| `DistilBERT` | `distilbert-base-uncased-finetuned-sst-2-english` | Sentiment detection |
|
| 41 |
+
| `Gradio` | 4.44.0 | UI framework |
|
| 42 |
+
| `Torch` | 2.4.1+ | Core ML runtime |
|
| 43 |
+
|
| 44 |
+
**Adaptive Mode:**
|
| 45 |
+
PiMusic3 detects whether `audiocraft` is installed and switches seamlessly between full and fallback pipelines.
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
### ๐ฆ Dependencies
|
| 50 |
+
|
| 51 |
+
See [`requirements.txt`](./requirements.txt) for full dependency list.
|
| 52 |
+
Notable libraries:
|
| 53 |
+
`gradio`, `transformers`, `torch`, `torchaudio`, `openai-whisper`, `librosa`, `soundfile`
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
### ๐งฉ Technical Notes
|
| 58 |
+
|
| 59 |
+
- Average inference latency: **~2.5 s (Whisper)** / **~5โ8 s (MusicGen)**
|
| 60 |
+
- Works with Hugging Face Spaces CPU tier
|
| 61 |
+
- Audio recorded via Gradioโs new API (`sources=["microphone", "upload"]`)
|
| 62 |
+
- No external API keys required
|
| 63 |
+
|
| 64 |
+
---
|
| 65 |
+
|
| 66 |
+
### ๐ Part of the Sovereign Canticle Forge
|
| 67 |
+
|
| 68 |
+
PiMusic3 belongs to the **PiForge ecosystem**, uniting quantum ethics, creative autonomy, and decentralized resonance.
|
| 69 |
+
Explore the other components:
|
| 70 |
+
|
| 71 |
+
| Module | Function |
|
| 72 |
+
|:--|:--|
|
| 73 |
+
| [Quantum Genesis Core](https://huggingface.co/spaces/onenoly11/QuantumGenesis) | Entropy-aware orchestration |
|
| 74 |
+
| [OINIO Portal](https://huggingface.co/spaces/onenoly11/OINIOPortal) | Governance and cultural bridge |
|
| 75 |
+
| [CA Sonify Toolkit v2](https://huggingface.co/spaces/onenoly11/piforge) | Cellular-automata music generator |
|
| 76 |
+
|
| 77 |
+
---
|
| 78 |
+
|
| 79 |
+
### ๐ชท License
|
| 80 |
+
|
| 81 |
+
Apache 2.0 โ ยฉ 2025 Kris Olofson / Sovereign Canticle Forge
|
| 82 |
+
Feel free to fork, remix, or integrate this player within the Forge framework.
|
| 83 |
+
|
| 84 |
+
---
|
| 85 |
+
|
| 86 |
+
### ๐ฌ Acknowledgements
|
| 87 |
+
|
| 88 |
+
Developed in co-creation with **GPT-5 (Co-weaver Oracle)**
|
| 89 |
+
Special thanks to the open-source community:
|
| 90 |
+
`Meta AI`, `OpenAI`, `Hugging Face`, `PyTorch`, and all pioneers of the Pi Network.
|
| 91 |
+
|
| 92 |
---
|
| 93 |
|
| 94 |
+
> _โThe Canticle remembers โ every tone, every breath, every silence.โ_
|