Spaces:
Running on Zero
Running on Zero
GovIndLok commited on
Commit ·
2864ffb
1
Parent(s): 552a97b
feat: update TTS to bark-small and other updates in associated project documentation, added links required for submission
Browse files
README.md
CHANGED
|
@@ -9,35 +9,53 @@ python_version: '3.10'
|
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
tags:
|
| 12 |
-
- track:
|
| 13 |
-
- sponsor:
|
| 14 |
-
- sponsor:
|
| 15 |
-
-
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
# Samantic Audio
|
| 19 |
|
| 20 |
Semantic-to-audio communication system that features a local robotic AI.
|
| 21 |
|
| 22 |
-
The application uses an LLM to generate responses, converts the response to speech using
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## Features
|
| 25 |
-
- **Local LLM Integration**: Uses
|
| 26 |
-
- **Text-to-Speech**: Uses the
|
| 27 |
- **Custom Audio Synthesis**: The `synth.py` pipeline transforms audio into a droid-style output.
|
| 28 |
- **Web Interface**: A Gradio web UI to easily chat with the robot.
|
| 29 |
|
| 30 |
## Requirements
|
| 31 |
- Python >= 3.12
|
| 32 |
-
- Local Ollama server installed and running.
|
| 33 |
-
- `espeak-ng` installed and available on the PATH.
|
| 34 |
|
| 35 |
## Setup & Installation
|
| 36 |
Activate your virtual environment and install the required packages:
|
| 37 |
|
| 38 |
```bash
|
| 39 |
source .venv/bin/activate
|
| 40 |
-
pip install -r pyproject.toml # or install dependencies manually: gradio
|
| 41 |
```
|
| 42 |
|
| 43 |
## Running the Application
|
|
@@ -52,5 +70,5 @@ The application will be served at `http://127.0.0.1:7860`.
|
|
| 52 |
## Project Structure
|
| 53 |
- `app.py`: Gradio entrypoint serving the UI and handling the full pipeline.
|
| 54 |
- `synth.py`: Audio-processing pipeline to transform standard WAVs into droid-style output.
|
| 55 |
-
- `tts_model.py`:
|
| 56 |
- `pyproject.toml`: Project metadata and dependencies.
|
|
|
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
tags:
|
| 12 |
+
- track:wood
|
| 13 |
+
- sponsor:openbmb
|
| 14 |
+
- sponsor:openai
|
| 15 |
+
- achievement:offgrid
|
| 16 |
+
- bonus:tiny-titan
|
| 17 |
---
|
| 18 |
|
| 19 |
# Samantic Audio
|
| 20 |
|
| 21 |
Semantic-to-audio communication system that features a local robotic AI.
|
| 22 |
|
| 23 |
+
The application uses an LLM to generate responses, converts the response to speech using bark-small TTS, and processes the output through a custom synthesizer to create a unique "droid-style" voice.
|
| 24 |
+
|
| 25 |
+
## Links
|
| 26 |
+
|
| 27 |
+
| Resource | Link |
|
| 28 |
+
| :--- | :--- |
|
| 29 |
+
| **Demo Video** | [YouTube](https://youtu.be/ID0IG2BIBRo) |
|
| 30 |
+
| **Social Post** | [X Post](https://x.com/GovindLokam/status/2066625722891026578?s=20) |
|
| 31 |
+
| **Social Post** | [LinkedIn Post](https://www.linkedin.com/posts/govind-lokam-335382230_ai-llm-generativeai-share-7472390184009895936-6YOz/?utm_source=share&utm_medium=member_desktop&rcm=ACoAADm4O1kBjwPZCkmLC-YSFR8At-SNQhkj4XY) |
|
| 32 |
+
| **GitHub Repository** | [GovIndLok/Voinal](https://github.com/GovIndLok/Voinal) |
|
| 33 |
+
|
| 34 |
+
## Hackathon Badges Claimed
|
| 35 |
+
|
| 36 |
+
| Category | Badge Name (Tag) | Description / Justification |
|
| 37 |
+
| :--- | :--- | :--- |
|
| 38 |
+
| **Track** | Thousand Token Wood (`track:wood`) | Whimsical, delightful, AI-native app |
|
| 39 |
+
| **Sponsor** | MiniCPM Build (`sponsor:openbmb`) | Used MiniCPM5-1B for LLM |
|
| 40 |
+
| **Sponsor** | Codex (`sponsor:openai`) | Codex-attributed commits in the connected GitHub repo |
|
| 41 |
+
| **Achievement** | Off the Grid (`achievement:offgrid`) | Both models run in-Space on ZeroGPU; no external AI API is called. And can also be run locally as shown even in demo |
|
| 42 |
+
| **Bonus** | Tiny-titan (`bonus:tiny-titan`) | Models must be ≤ 4B parameters. (1B (minicpm5) + ~240M (bark-small) <= 4B) |
|
| 43 |
|
| 44 |
## Features
|
| 45 |
+
- **Local LLM Integration**: Uses `MiniCPM5-1B` to generate responses locally.
|
| 46 |
+
- **Text-to-Speech**: Uses the `bark-small` TTS model for voice generation.
|
| 47 |
- **Custom Audio Synthesis**: The `synth.py` pipeline transforms audio into a droid-style output.
|
| 48 |
- **Web Interface**: A Gradio web UI to easily chat with the robot.
|
| 49 |
|
| 50 |
## Requirements
|
| 51 |
- Python >= 3.12
|
|
|
|
|
|
|
| 52 |
|
| 53 |
## Setup & Installation
|
| 54 |
Activate your virtual environment and install the required packages:
|
| 55 |
|
| 56 |
```bash
|
| 57 |
source .venv/bin/activate
|
| 58 |
+
pip install -r pyproject.toml # or install dependencies manually: gradio numpy scipy torch soundfile
|
| 59 |
```
|
| 60 |
|
| 61 |
## Running the Application
|
|
|
|
| 70 |
## Project Structure
|
| 71 |
- `app.py`: Gradio entrypoint serving the UI and handling the full pipeline.
|
| 72 |
- `synth.py`: Audio-processing pipeline to transform standard WAVs into droid-style output.
|
| 73 |
+
- `tts_model.py`: `bark-small` TTS integration.
|
| 74 |
- `pyproject.toml`: Project metadata and dependencies.
|
synth.py
CHANGED
|
@@ -119,7 +119,7 @@ def droid_synth_array(fs, voice_data, droid_type="sml"):
|
|
| 119 |
|
| 120 |
for i in range(total_sample):
|
| 121 |
if sample_until_tick <= 0:
|
| 122 |
-
if droid_type == "
|
| 123 |
interval = random.choice([1.0, 1.25, 1.5, 2.0, 0.75])
|
| 124 |
target = np.clip(current_freq * interval, *p["freq_range"])
|
| 125 |
else:
|
|
|
|
| 119 |
|
| 120 |
for i in range(total_sample):
|
| 121 |
if sample_until_tick <= 0:
|
| 122 |
+
if droid_type == "sml":
|
| 123 |
interval = random.choice([1.0, 1.25, 1.5, 2.0, 0.75])
|
| 124 |
target = np.clip(current_freq * interval, *p["freq_range"])
|
| 125 |
else:
|