aillom-vox-client 2.1.2 → 2.1.4
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 +71 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,20 +52,86 @@ Hosted docs: `https://vox.aillom.com/docs`
|
|
|
52
52
|
|
|
53
53
|
## Quick start
|
|
54
54
|
|
|
55
|
-
###
|
|
55
|
+
### Use the SDK in your app
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
You do **not** need to clone this repository to use the SDK. In your own project:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
+
npm install aillom-vox-client
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then import it:
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
import { AillomVox } from 'aillom-vox-client';
|
|
67
|
+
|
|
68
|
+
const client = new AillomVox({
|
|
69
|
+
apiKey: 'av_YOUR_API_KEY',
|
|
70
|
+
provider: 'aillomvox',
|
|
71
|
+
ttsEngine: 'inworld',
|
|
72
|
+
voice: 'Aanya',
|
|
73
|
+
language: 'pt-BR',
|
|
74
|
+
sampleRate: 16000,
|
|
75
|
+
systemPrompt: 'Voce e um assistente objetivo e educado.',
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
await client.connect();
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If you want a new browser app from zero:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm create vite@latest my-vox-app -- --template vanilla-ts
|
|
85
|
+
cd my-vox-app
|
|
86
|
+
npm install
|
|
87
|
+
npm install aillom-vox-client
|
|
88
|
+
npm run dev
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Run the ready-made example UI
|
|
92
|
+
|
|
93
|
+
Clone the repository only when you want to run the example app that already has UI, microphone capture, playback, transcripts and logs.
|
|
94
|
+
|
|
95
|
+
Windows PowerShell:
|
|
96
|
+
|
|
97
|
+
```powershell
|
|
98
|
+
winget install --id OpenJS.NodeJS.LTS -e
|
|
99
|
+
winget install --id Git.Git -e
|
|
100
|
+
git clone https://github.com/aillom/aillom-vox-client.git
|
|
101
|
+
cd aillom-vox-client\examples\npm-quickstart
|
|
102
|
+
npm install
|
|
103
|
+
npm run dev
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Ubuntu / Debian:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
sudo apt update
|
|
110
|
+
sudo apt install -y git curl ca-certificates
|
|
111
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
|
112
|
+
export NVM_DIR="$HOME/.nvm"
|
|
113
|
+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
114
|
+
nvm install --lts
|
|
115
|
+
nvm use --lts
|
|
116
|
+
git clone https://github.com/aillom/aillom-vox-client.git
|
|
117
|
+
cd aillom-vox-client/examples/npm-quickstart
|
|
118
|
+
npm install
|
|
119
|
+
npm run dev
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
macOS:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
brew install node git
|
|
60
126
|
git clone https://github.com/aillom/aillom-vox-client.git
|
|
61
127
|
cd aillom-vox-client/examples/npm-quickstart
|
|
62
128
|
npm install
|
|
63
129
|
npm run dev
|
|
64
130
|
```
|
|
65
131
|
|
|
66
|
-
Open the Vite URL, paste your `av_...` key, click **Carregar vozes**, then **Iniciar chamada**.
|
|
132
|
+
Open the Vite URL, paste your `av_...` key, click **Carregar vozes**, then **Iniciar chamada**. Full setup and troubleshooting steps are in [docs/NPM_QUICKSTART.md](docs/NPM_QUICKSTART.md).
|
|
67
133
|
|
|
68
|
-
Terminal smoke test
|
|
134
|
+
### Terminal smoke test
|
|
69
135
|
|
|
70
136
|
```bash
|
|
71
137
|
mkdir vox-smoke && cd vox-smoke
|
|
@@ -80,7 +146,7 @@ Expected output:
|
|
|
80
146
|
{ providers: 7, pricing: 7 }
|
|
81
147
|
```
|
|
82
148
|
|
|
83
|
-
###
|
|
149
|
+
### Realtime voice snippet
|
|
84
150
|
|
|
85
151
|
```typescript
|
|
86
152
|
import { AillomVox } from 'aillom-vox-client';
|
package/package.json
CHANGED