File size: 1,700 Bytes
f0d8b62
 
0f098ef
 
f0d8b62
 
0f098ef
 
f0d8b62
2902416
0f098ef
 
 
 
 
 
f0d8b62
 
0f098ef
 
2902416
0f098ef
2902416
 
0f098ef
2902416
 
 
 
 
0f098ef
 
 
 
2902416
0f098ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
title: Phonon Reader
emoji: 🔊
colorFrom: yellow
colorTo: red
sdk: static
app_file: dist/index.html
app_build_command: npm install && npm run build
pinned: false
short_description: Text to MP3 on your device. Nothing uploaded, works offline.
models:
  - gradium/phonon-31m-en
custom_headers:
  cross-origin-embedder-policy: require-corp
  cross-origin-opener-policy: same-origin
  cross-origin-resource-policy: cross-origin
---

# Phonon Reader

Paste an article or any text, convert it to an MP3 (or WAV), and share it to another app or save it.
Speech is generated **in your browser** with [Phonon 31m](https://huggingface.co/gradium/phonon-31m-en)
via [`phonon-tts`](https://www.npmjs.com/package/phonon-tts) (WebAssembly), and MP3 encoding runs locally
with [lamejs](https://github.com/zhuker/lamejs). Your text is never uploaded.

- First run downloads the model (~65 MB) from the Hub. The app shows when the app, model and voice are
  saved on the device; after that it works with Wi‑Fi off.
- Install it: open the Space's direct URL in Chrome on Android and choose **Install app**. It then shows up in
  the Android share sheet, so you can share selected text into it, and share the finished audio out.
- You can also just listen in the app, with the current sentence highlighted.
- Voices come from [`gradium/phonon-voices`](https://huggingface.co/gradium/phonon-voices).

Network requests: the app files from this Space, and model/voice files from huggingface.co. Nothing else.

No bundler: `npm run build` copies the app, `phonon-tts` and the MP3 encoder into `dist/` and writes the
service worker's precache list. `npm run serve` serves `dist/` locally with the isolation headers.