@nkirit/ai-voice 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 +7 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @nkirit/ai-voice
|
|
2
2
|
|
|
3
3
|
Isomorphic TypeScript TTS library for OpenAI, ElevenLabs, and Google Cloud TTS. **BYOK** — bring your own API key. Works in Node 18+ and modern browsers (no vendor SDKs, just `fetch`).
|
|
4
4
|
|
|
5
|
+
**[Live demo →](https://ai-voice-app-iota.vercel.app)**
|
|
6
|
+
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
npm install @
|
|
10
|
+
npm install @nkirit/ai-voice
|
|
9
11
|
```
|
|
10
12
|
|
|
11
13
|
## Quick start
|
|
12
14
|
|
|
13
15
|
```ts
|
|
14
|
-
import { synthesize } from "@
|
|
16
|
+
import { synthesize } from "@nkirit/ai-voice";
|
|
15
17
|
|
|
16
18
|
const bytes = await synthesize({
|
|
17
19
|
provider: "openai",
|
|
@@ -24,7 +26,7 @@ const bytes = await synthesize({
|
|
|
24
26
|
## Streaming
|
|
25
27
|
|
|
26
28
|
```ts
|
|
27
|
-
import { synthesizeStream } from "@
|
|
29
|
+
import { synthesizeStream } from "@nkirit/ai-voice";
|
|
28
30
|
|
|
29
31
|
const stream = await synthesizeStream({
|
|
30
32
|
provider: "elevenlabs",
|
|
@@ -100,7 +102,7 @@ await synthesize({
|
|
|
100
102
|
## Error handling
|
|
101
103
|
|
|
102
104
|
```ts
|
|
103
|
-
import { synthesize, InvalidApiKeyError, ProviderError, VoiceAppError } from "@
|
|
105
|
+
import { synthesize, InvalidApiKeyError, ProviderError, VoiceAppError } from "@nkirit/ai-voice";
|
|
104
106
|
|
|
105
107
|
try {
|
|
106
108
|
const bytes = await synthesize({ provider: "openai", apiKey: "bad", text: "hi" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nkirit/ai-voice",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Isomorphic TypeScript TTS client for OpenAI, ElevenLabs, and Google Cloud TTS. BYOK.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"engines": { "node": ">=18.18" },
|
|
30
30
|
"publishConfig": { "access": "public" },
|
|
31
31
|
"keywords": ["tts", "openai", "elevenlabs", "google-cloud-tts", "isomorphic", "byok"],
|
|
32
|
-
"repository": { "type": "git", "url": "https://github.com/
|
|
33
|
-
"homepage": "https://github.com/
|
|
32
|
+
"repository": { "type": "git", "url": "https://github.com/nkirit/ai-voice" },
|
|
33
|
+
"homepage": "https://github.com/nkirit/ai-voice#readme"
|
|
34
34
|
}
|