phonic 0.31.15 → 0.31.16
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 +394 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +9 -4
- package/dist/cjs/api/resources/agents/client/Client.d.ts +12 -0
- package/dist/cjs/api/resources/agents/client/Client.js +12 -0
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +6 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +4 -0
- package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +4 -0
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/tts/client/Client.d.ts +23 -0
- package/dist/cjs/api/resources/tts/client/Client.js +115 -0
- package/dist/cjs/api/resources/tts/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/tts/client/index.js +17 -0
- package/dist/cjs/api/resources/tts/client/requests/StreamTtsRequest.d.ts +28 -0
- package/dist/cjs/api/resources/tts/client/requests/StreamTtsRequest.js +14 -0
- package/dist/cjs/api/resources/tts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tts/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/tts/exports.d.ts +2 -0
- package/dist/cjs/api/resources/tts/exports.js +21 -0
- package/dist/cjs/api/resources/tts/index.d.ts +1 -0
- package/dist/cjs/api/resources/tts/index.js +17 -0
- package/dist/cjs/api/types/Agent.d.ts +9 -0
- package/dist/cjs/api/types/ConfigOptions.d.ts +11 -5
- package/dist/cjs/api/types/Conversation.d.ts +9 -0
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +9 -0
- package/dist/cjs/api/types/InlineWebSocketTool.d.ts +30 -0
- package/dist/cjs/api/types/InlineWebSocketTool.js +12 -0
- package/dist/cjs/api/types/OpenAiFunction.d.ts +10 -0
- package/dist/cjs/api/types/OpenAiFunction.js +3 -0
- package/dist/cjs/api/types/OpenAiFunctionParameters.d.ts +4 -0
- package/dist/cjs/api/types/OpenAiFunctionParameters.js +3 -0
- package/dist/cjs/api/types/OpenAiTool.d.ts +8 -0
- package/dist/cjs/api/types/OpenAiTool.js +3 -0
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +9 -0
- package/dist/cjs/api/types/ToolDefinition.d.ts +2 -0
- package/dist/cjs/api/types/ToolDefinition.js +3 -0
- package/dist/cjs/api/types/ToolName.d.ts +4 -0
- package/dist/cjs/api/types/ToolName.js +3 -0
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/agents/client/Client.d.mts +12 -0
- package/dist/esm/api/resources/agents/client/Client.mjs +12 -0
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +6 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +13 -0
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +4 -0
- package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +4 -0
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/tts/client/Client.d.mts +23 -0
- package/dist/esm/api/resources/tts/client/Client.mjs +78 -0
- package/dist/esm/api/resources/tts/client/index.d.mts +1 -0
- package/dist/esm/api/resources/tts/client/index.mjs +1 -0
- package/dist/esm/api/resources/tts/client/requests/StreamTtsRequest.d.mts +28 -0
- package/dist/esm/api/resources/tts/client/requests/StreamTtsRequest.mjs +11 -0
- package/dist/esm/api/resources/tts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tts/exports.d.mts +2 -0
- package/dist/esm/api/resources/tts/exports.mjs +3 -0
- package/dist/esm/api/resources/tts/index.d.mts +1 -0
- package/dist/esm/api/resources/tts/index.mjs +1 -0
- package/dist/esm/api/types/Agent.d.mts +9 -0
- package/dist/esm/api/types/ConfigOptions.d.mts +11 -5
- package/dist/esm/api/types/Conversation.d.mts +9 -0
- package/dist/esm/api/types/CreateAgentRequest.d.mts +9 -0
- package/dist/esm/api/types/InlineWebSocketTool.d.mts +30 -0
- package/dist/esm/api/types/InlineWebSocketTool.mjs +9 -0
- package/dist/esm/api/types/OpenAiFunction.d.mts +10 -0
- package/dist/esm/api/types/OpenAiFunction.mjs +2 -0
- package/dist/esm/api/types/OpenAiFunctionParameters.d.mts +4 -0
- package/dist/esm/api/types/OpenAiFunctionParameters.mjs +2 -0
- package/dist/esm/api/types/OpenAiTool.d.mts +8 -0
- package/dist/esm/api/types/OpenAiTool.mjs +2 -0
- package/dist/esm/api/types/OutboundCallConfig.d.mts +9 -0
- package/dist/esm/api/types/ToolDefinition.d.mts +2 -0
- package/dist/esm/api/types/ToolDefinition.mjs +2 -0
- package/dist/esm/api/types/ToolName.d.mts +4 -0
- package/dist/esm/api/types/ToolName.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +19 -8
- package/reference.md +82 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phonic",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -111,6 +111,17 @@
|
|
|
111
111
|
},
|
|
112
112
|
"default": "./dist/cjs/api/resources/auth/exports.js"
|
|
113
113
|
},
|
|
114
|
+
"./tts": {
|
|
115
|
+
"import": {
|
|
116
|
+
"types": "./dist/esm/api/resources/tts/exports.d.mts",
|
|
117
|
+
"default": "./dist/esm/api/resources/tts/exports.mjs"
|
|
118
|
+
},
|
|
119
|
+
"require": {
|
|
120
|
+
"types": "./dist/cjs/api/resources/tts/exports.d.ts",
|
|
121
|
+
"default": "./dist/cjs/api/resources/tts/exports.js"
|
|
122
|
+
},
|
|
123
|
+
"default": "./dist/cjs/api/resources/tts/exports.js"
|
|
124
|
+
},
|
|
114
125
|
"./projects": {
|
|
115
126
|
"import": {
|
|
116
127
|
"types": "./dist/esm/api/resources/projects/exports.d.mts",
|
|
@@ -148,18 +159,18 @@
|
|
|
148
159
|
"ws": "^8.20.0"
|
|
149
160
|
},
|
|
150
161
|
"devDependencies": {
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"@types/jest": "^29.5.14",
|
|
154
|
-
"@types/node": "^18.19.70",
|
|
162
|
+
"webpack": "^5.105.4",
|
|
163
|
+
"ts-loader": "^9.5.4",
|
|
155
164
|
"@types/ws": "^8.18.1",
|
|
156
165
|
"jest": "^29.7.0",
|
|
166
|
+
"@jest/globals": "^29.7.0",
|
|
167
|
+
"@types/jest": "^29.5.14",
|
|
168
|
+
"ts-jest": "^29.3.4",
|
|
157
169
|
"jest-environment-jsdom": "^29.7.0",
|
|
158
170
|
"msw": "2.11.2",
|
|
159
|
-
"
|
|
160
|
-
"ts-loader": "^9.5.4",
|
|
171
|
+
"@types/node": "^18.19.70",
|
|
161
172
|
"typescript": "~5.9.3",
|
|
162
|
-
"
|
|
173
|
+
"@biomejs/biome": "2.4.9"
|
|
163
174
|
},
|
|
164
175
|
"browser": {
|
|
165
176
|
"fs": false,
|
package/reference.md
CHANGED
|
@@ -118,6 +118,10 @@ await client.agents.create({
|
|
|
118
118
|
multilingual_mode: "request",
|
|
119
119
|
push_to_talk: false,
|
|
120
120
|
boosted_keywords: ["Load ID", "dispatch"],
|
|
121
|
+
pronunciation_dictionary: [{
|
|
122
|
+
word: "Phuket",
|
|
123
|
+
pronunciation: "Poo-ket"
|
|
124
|
+
}],
|
|
121
125
|
min_words_to_interrupt: 1,
|
|
122
126
|
configuration_endpoint: {
|
|
123
127
|
url: "https://api.example.com/config",
|
|
@@ -217,6 +221,10 @@ await client.agents.upsert({
|
|
|
217
221
|
multilingual_mode: "request",
|
|
218
222
|
push_to_talk: false,
|
|
219
223
|
boosted_keywords: ["Load ID", "dispatch"],
|
|
224
|
+
pronunciation_dictionary: [{
|
|
225
|
+
word: "Phuket",
|
|
226
|
+
pronunciation: "Poo-ket"
|
|
227
|
+
}],
|
|
220
228
|
min_words_to_interrupt: 1,
|
|
221
229
|
configuration_endpoint: {
|
|
222
230
|
url: "https://api.example.com/config",
|
|
@@ -462,6 +470,10 @@ await client.agents.update("nameOrId", {
|
|
|
462
470
|
multilingual_mode: "request",
|
|
463
471
|
push_to_talk: false,
|
|
464
472
|
boosted_keywords: ["Load ID", "dispatch"],
|
|
473
|
+
pronunciation_dictionary: [{
|
|
474
|
+
word: "Phuket",
|
|
475
|
+
pronunciation: "Poo-ket"
|
|
476
|
+
}],
|
|
465
477
|
min_words_to_interrupt: 1,
|
|
466
478
|
configuration_endpoint: {
|
|
467
479
|
url: "https://api.example.com/config",
|
|
@@ -2337,6 +2349,10 @@ await client.conversations.outboundCall({
|
|
|
2337
2349
|
multilingual_mode: "request",
|
|
2338
2350
|
push_to_talk: false,
|
|
2339
2351
|
boosted_keywords: ["Load ID", "dispatch"],
|
|
2352
|
+
pronunciation_dictionary: [{
|
|
2353
|
+
word: "Phuket",
|
|
2354
|
+
pronunciation: "Poo-ket"
|
|
2355
|
+
}],
|
|
2340
2356
|
min_words_to_interrupt: 1,
|
|
2341
2357
|
tools: ["keypad_input"]
|
|
2342
2358
|
},
|
|
@@ -2506,6 +2522,72 @@ await client.auth.createSessionToken({
|
|
|
2506
2522
|
</dl>
|
|
2507
2523
|
|
|
2508
2524
|
|
|
2525
|
+
</dd>
|
|
2526
|
+
</dl>
|
|
2527
|
+
</details>
|
|
2528
|
+
|
|
2529
|
+
## Tts
|
|
2530
|
+
<details><summary><code>client.tts.<a href="/src/api/resources/tts/client/Client.ts">stream</a>({ ...params }) -> core.BinaryResponse</code></summary>
|
|
2531
|
+
<dl>
|
|
2532
|
+
<dd>
|
|
2533
|
+
|
|
2534
|
+
#### 📝 Description
|
|
2535
|
+
|
|
2536
|
+
<dl>
|
|
2537
|
+
<dd>
|
|
2538
|
+
|
|
2539
|
+
<dl>
|
|
2540
|
+
<dd>
|
|
2541
|
+
|
|
2542
|
+
Streams generated speech audio for the provided text.
|
|
2543
|
+
</dd>
|
|
2544
|
+
</dl>
|
|
2545
|
+
</dd>
|
|
2546
|
+
</dl>
|
|
2547
|
+
|
|
2548
|
+
#### 🔌 Usage
|
|
2549
|
+
|
|
2550
|
+
<dl>
|
|
2551
|
+
<dd>
|
|
2552
|
+
|
|
2553
|
+
<dl>
|
|
2554
|
+
<dd>
|
|
2555
|
+
|
|
2556
|
+
```typescript
|
|
2557
|
+
await client.tts.stream({
|
|
2558
|
+
text: "x"
|
|
2559
|
+
});
|
|
2560
|
+
|
|
2561
|
+
```
|
|
2562
|
+
</dd>
|
|
2563
|
+
</dl>
|
|
2564
|
+
</dd>
|
|
2565
|
+
</dl>
|
|
2566
|
+
|
|
2567
|
+
#### ⚙️ Parameters
|
|
2568
|
+
|
|
2569
|
+
<dl>
|
|
2570
|
+
<dd>
|
|
2571
|
+
|
|
2572
|
+
<dl>
|
|
2573
|
+
<dd>
|
|
2574
|
+
|
|
2575
|
+
**request:** `Phonic.StreamTtsRequest`
|
|
2576
|
+
|
|
2577
|
+
</dd>
|
|
2578
|
+
</dl>
|
|
2579
|
+
|
|
2580
|
+
<dl>
|
|
2581
|
+
<dd>
|
|
2582
|
+
|
|
2583
|
+
**requestOptions:** `TtsClient.RequestOptions`
|
|
2584
|
+
|
|
2585
|
+
</dd>
|
|
2586
|
+
</dl>
|
|
2587
|
+
</dd>
|
|
2588
|
+
</dl>
|
|
2589
|
+
|
|
2590
|
+
|
|
2509
2591
|
</dd>
|
|
2510
2592
|
</dl>
|
|
2511
2593
|
</details>
|