KevinAHM commited on
Commit
d4cd134
Β·
verified Β·
1 Parent(s): 9b19787

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +111 -107
README.md CHANGED
@@ -1,107 +1,111 @@
1
- ---
2
- title: Soprano 1.1 ONNX Web Demo
3
- emoji: 🎧
4
- colorFrom: blue
5
- colorTo: indigo
6
- sdk: static
7
- short_description: Real-time text-to-speech in the browser using ONNX
8
- app_file: index.html
9
- pinned: false
10
- models:
11
- - KevinAHM/soprano-1.1-onnx
12
- license: apache-2.0
13
- ---
14
-
15
- <!-- Version 0.0.3 -->
16
- <div align="center">
17
-
18
- # Soprano 1.1 ONNX Streaming β€” Instant Text‑to‑Speech in the Browser (WASM)
19
-
20
- [![Upstream](https://img.shields.io/badge/Upstream-ekwek1%2Fsoprano-black?logo=github)](https://github.com/ekwek1/soprano)
21
- [![Hugging Face Model](https://img.shields.io/badge/HuggingFace-Model-orange?logo=huggingface)](https://huggingface.co/KevinAHM/soprano-onnx)
22
- [![Hugging Face Demo for Soprano Web Onnx](https://img.shields.io/badge/HuggingFace-Demo-yellow?logo=huggingface)](https://huggingface.co/spaces/KevinAHM/soprano-web-onnx)
23
-
24
- A **static, client-side** browser demo that runs the Soprano TTS pipeline using **onnxruntime-web**.
25
-
26
- Soprano 1.1 features significant performance optimizations, including moving all heavy inference to a **Web Worker** and utilizing an **int8 quantized decoder** for superior real-time speeds on consumer CPUs.
27
-
28
- ---
29
-
30
- ## Requirements
31
-
32
- - A modern browser (Chrome, Edge, Firefox, Safari).
33
- - You must serve this folder over HTTP (opening `index.html` via `file://` usually breaks `fetch()` / module loading).
34
- - The demo loads `onnxruntime-web` and `@huggingface/transformers` from a CDN by default (network required unless you vendor them).
35
- - The model files are large; plan to use **Git LFS** or GitHub Releases if you publish them.
36
-
37
- ---
38
-
39
- ## Folder layout
40
-
41
- Place model artifacts under `./models/`:
42
-
43
- ```text
44
- .
45
- β”œβ”€ index.html
46
- β”œβ”€ onnx-streaming.js (Main Thread Client)
47
- β”œβ”€ inference-worker.js (Heavy Inference Engine)
48
- β”œβ”€ PCMPlayerWorklet.js (Audio Playback Worklet)
49
- β”œβ”€ style.css
50
- β”œβ”€ onnx/
51
- β”‚ β”œβ”€ soprano_backbone_kv_fp32.onnx
52
- β”‚ └─ soprano_decoder_int8.onnx
53
- ...
54
- ```
55
-
56
- Notes:
57
- - ONNX models live in `onnx/` following HuggingFace convention.
58
- - The decoder uses external weights (`.onnx.data` file must be present alongside the `.onnx` file).
59
- - Tokenizer files are in the root directory.
60
-
61
- ---
62
-
63
- ## Run locally
64
-
65
- Use any static file server from this directory, for example:
66
-
67
- ```bash
68
- python -m http.server 8085
69
- ```
70
-
71
- Then open `http://localhost:8085`.
72
-
73
- ---
74
-
75
- ## Configuration
76
-
77
- Model paths are defined near the top of `onnx-streaming.js` in the `MODELS` object.
78
-
79
- Sampling defaults are set in `onnx-streaming.js` (constructor):
80
- - `temperature`
81
- - `topK`
82
- - `topP`
83
- - `repetitionPenalty`
84
-
85
- ---
86
-
87
- ## Troubleshooting
88
-
89
- - **"Load failed" / model never becomes Ready**
90
- - Verify the `onnx/` filenames match `MODELS` in `onnx-streaming.js`
91
- - Check DevTools β†’ Network for a missing `.onnx.data` file (404)
92
- - Confirm `/` contains `tokenizer.json` (and related files)
93
- - **Performance notes**
94
- - **Web Worker:** Keeps the UI responsive (no lag during generation).
95
- - **int8 Decoder:** Optimized for high-throughput CPU inference.
96
- - Achieves real-time streaming on modern hardware
97
-
98
- ---
99
-
100
- ## License & attribution
101
-
102
- Soprano is released under **Apache-2.0** in the upstream repository:
103
- https://github.com/ekwek1/soprano
104
-
105
-
106
-
107
-
 
 
 
 
 
1
+ ---
2
+ title: Soprano 1.1 ONNX Web Demo
3
+ emoji: 🎧
4
+ colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: static
7
+ short_description: Real-time text-to-speech in the browser using ONNX
8
+ app_file: index.html
9
+ pinned: false
10
+ models:
11
+ - KevinAHM/soprano-1.1-onnx
12
+ license: apache-2.0
13
+ custom_headers:
14
+ cross-origin-embedder-policy: require-corp
15
+ cross-origin-opener-policy: same-origin
16
+ cross-origin-resource-policy: cross-origin
17
+ ---
18
+
19
+ <!-- Version 0.0.3 -->
20
+ <div align="center">
21
+
22
+ # Soprano 1.1 ONNX Streaming β€” Instant Text‑to‑Speech in the Browser (WASM)
23
+
24
+ [![Upstream](https://img.shields.io/badge/Upstream-ekwek1%2Fsoprano-black?logo=github)](https://github.com/ekwek1/soprano)
25
+ [![Hugging Face Model](https://img.shields.io/badge/HuggingFace-Model-orange?logo=huggingface)](https://huggingface.co/KevinAHM/soprano-onnx)
26
+ [![Hugging Face Demo for Soprano Web Onnx](https://img.shields.io/badge/HuggingFace-Demo-yellow?logo=huggingface)](https://huggingface.co/spaces/KevinAHM/soprano-web-onnx)
27
+
28
+ A **static, client-side** browser demo that runs the Soprano TTS pipeline using **onnxruntime-web**.
29
+
30
+ Soprano 1.1 features significant performance optimizations, including moving all heavy inference to a **Web Worker** and utilizing an **int8 quantized decoder** for superior real-time speeds on consumer CPUs.
31
+
32
+ ---
33
+
34
+ ## Requirements
35
+
36
+ - A modern browser (Chrome, Edge, Firefox, Safari).
37
+ - You must serve this folder over HTTP (opening `index.html` via `file://` usually breaks `fetch()` / module loading).
38
+ - The demo loads `onnxruntime-web` and `@huggingface/transformers` from a CDN by default (network required unless you vendor them).
39
+ - The model files are large; plan to use **Git LFS** or GitHub Releases if you publish them.
40
+
41
+ ---
42
+
43
+ ## Folder layout
44
+
45
+ Place model artifacts under `./models/`:
46
+
47
+ ```text
48
+ .
49
+ β”œβ”€ index.html
50
+ β”œβ”€ onnx-streaming.js (Main Thread Client)
51
+ β”œβ”€ inference-worker.js (Heavy Inference Engine)
52
+ β”œβ”€ PCMPlayerWorklet.js (Audio Playback Worklet)
53
+ β”œβ”€ style.css
54
+ β”œβ”€ onnx/
55
+ β”‚ β”œβ”€ soprano_backbone_kv_fp32.onnx
56
+ β”‚ └─ soprano_decoder_int8.onnx
57
+ ...
58
+ ```
59
+
60
+ Notes:
61
+ - ONNX models live in `onnx/` following HuggingFace convention.
62
+ - The decoder uses external weights (`.onnx.data` file must be present alongside the `.onnx` file).
63
+ - Tokenizer files are in the root directory.
64
+
65
+ ---
66
+
67
+ ## Run locally
68
+
69
+ Use any static file server from this directory, for example:
70
+
71
+ ```bash
72
+ python -m http.server 8085
73
+ ```
74
+
75
+ Then open `http://localhost:8085`.
76
+
77
+ ---
78
+
79
+ ## Configuration
80
+
81
+ Model paths are defined near the top of `onnx-streaming.js` in the `MODELS` object.
82
+
83
+ Sampling defaults are set in `onnx-streaming.js` (constructor):
84
+ - `temperature`
85
+ - `topK`
86
+ - `topP`
87
+ - `repetitionPenalty`
88
+
89
+ ---
90
+
91
+ ## Troubleshooting
92
+
93
+ - **"Load failed" / model never becomes Ready**
94
+ - Verify the `onnx/` filenames match `MODELS` in `onnx-streaming.js`
95
+ - Check DevTools β†’ Network for a missing `.onnx.data` file (404)
96
+ - Confirm `/` contains `tokenizer.json` (and related files)
97
+ - **Performance notes**
98
+ - **Web Worker:** Keeps the UI responsive (no lag during generation).
99
+ - **int8 Decoder:** Optimized for high-throughput CPU inference.
100
+ - Achieves real-time streaming on modern hardware
101
+
102
+ ---
103
+
104
+ ## License & attribution
105
+
106
+ Soprano is released under **Apache-2.0** in the upstream repository:
107
+ https://github.com/ekwek1/soprano
108
+
109
+
110
+
111
+