@lantun/voice-kitten 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
# @lantun/voice-kitten
|
|
2
2
|
|
|
3
|
-
Lifelike English voices for [Lantun](https://
|
|
3
|
+
**Lifelike English voices for [Lantun](https://www.npmjs.com/package/@lantun/core), generated on the reader's device with [Kitten TTS](https://github.com/KittenML/KittenTTS).**
|
|
4
|
+
|
|
5
|
+
Browser voices differ by device, and many sound robotic. This add-on gives every reader the same natural voices. They run in a web worker in the browser, so you don't need a server or an API key, and you pay nothing per use.
|
|
6
|
+
|
|
7
|
+
**[Hear them in the live demo →](https://lantun.rzknkbr.xyz)** Open an English article, press play, and pick a voice from the voice menu.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
## Install
|
|
4
12
|
|
|
5
13
|
```sh
|
|
6
14
|
npm install @lantun/core @lantun/voice-kitten
|
|
7
15
|
```
|
|
8
16
|
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
9
19
|
```ts
|
|
10
20
|
import { init, registerVoices } from "@lantun/core";
|
|
11
21
|
import { kittenVoices } from "@lantun/voice-kitten";
|
|
@@ -13,3 +23,42 @@ import { kittenVoices } from "@lantun/voice-kitten";
|
|
|
13
23
|
registerVoices(kittenVoices());
|
|
14
24
|
init();
|
|
15
25
|
```
|
|
26
|
+
|
|
27
|
+
The voices appear in Lantun's voice menu next to the browser's own voices. With React, import `registerVoices` from `@lantun/react` instead; it's the same function.
|
|
28
|
+
|
|
29
|
+
## What readers download
|
|
30
|
+
|
|
31
|
+
**Nothing, until they pick one of these voices.** Then the model and runtime download once (about 31 MB) and are cached by the browser. A few sentences into a first listen, Lantun suggests these voices to the reader. They're not offered when Data Saver is on or on devices with little memory, and if a device can't generate speech fast enough, Lantun goes back to the browser's voices.
|
|
32
|
+
|
|
33
|
+
The voices speak English. Articles in other languages use the browser's voices.
|
|
34
|
+
|
|
35
|
+
## Options
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
kittenVoices({
|
|
39
|
+
voices: ["Luna", "Jasper"], // offer only some voices
|
|
40
|
+
sources: { model: "https://your-cdn.example/kitten.onnx" }, // self-host any file
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
| Option | Default | What it does |
|
|
45
|
+
| --------- | ----------- | ------------------------------------------------------------------------------------------------------ |
|
|
46
|
+
| `voices` | all | Voices to offer: `Jasper`, `Luna`, `Bruno`, `Rosie`, `Hugo`, `Leo`. |
|
|
47
|
+
| `sources` | public CDNs | Override any of `model`, `voices`, `config` (Hugging Face), `ort`, `ortWasm`, `phonemizer` (jsDelivr). |
|
|
48
|
+
|
|
49
|
+
## Script tag
|
|
50
|
+
|
|
51
|
+
With the [`lantun`](https://www.npmjs.com/package/lantun) script tag, add the voices as a second tag:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/lantun@0.1/dist/widget.js"></script>
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/lantun@0.1/dist/voice-kitten.js"></script>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Links
|
|
59
|
+
|
|
60
|
+
- [Live demo](https://lantun.rzknkbr.xyz)
|
|
61
|
+
- [GitHub](https://github.com/rizkianakbar/lantun)
|
|
62
|
+
- [Issues](https://github.com/rizkianakbar/lantun/issues)
|
|
63
|
+
|
|
64
|
+
MIT licensed. The Kitten TTS model is Apache-2.0.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lantun/voice-kitten",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Lifelike, on-device English voices for Lantun, powered by Kitten TTS. Nothing downloads until a reader picks one.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"text-to-speech",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"author": "rizkianakbar",
|
|
15
|
-
"homepage": "https://
|
|
15
|
+
"homepage": "https://lantun.rzknkbr.xyz",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "git+https://github.com/rizkianakbar/lantun.git",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@lantun/core": "^0.1.
|
|
37
|
+
"@lantun/core": "^0.1.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lantun/core": "^0.1.
|
|
40
|
+
"@lantun/core": "^0.1.1",
|
|
41
41
|
"esbuild": "^0.28.2",
|
|
42
42
|
"jsdom": "^30.1.3",
|
|
43
43
|
"typescript": "^7.0.2",
|