phonic 0.29.1 → 0.29.2
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 +3 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -1
- package/dist/index.mjs +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,6 +80,7 @@ const result = await phonic.agents.create({
|
|
|
80
80
|
timezone: "Australia/Melbourne", // Defaults to "America/Los_Angeles"
|
|
81
81
|
audioFormat: "mulaw_8000", // Defaults to "pcm_44100". Must be "mulaw_8000" when `phoneNumber` is "assign-automatically"
|
|
82
82
|
voiceId: "sarah", // Defaults to "grant"
|
|
83
|
+
audioSpeed: 1.1, // Defaults to 1.0. Must be between 0.5 and 1.5, multiple of 0.1
|
|
83
84
|
welcomeMessage: "Hello, how can I help you?", // Defaults to ""
|
|
84
85
|
systemPrompt: "You are an expert in {{subject}}. Be kind to {{user_name}}.", // Defaults to "Respond in 1-2 sentences."
|
|
85
86
|
templateVariables: {
|
|
@@ -117,6 +118,7 @@ const result = await phonic.agents.update("chris", {
|
|
|
117
118
|
timezone: "Australia/Melbourne",
|
|
118
119
|
voiceId: "sarah",
|
|
119
120
|
audioFormat: "mulaw_8000", // Must be "mulaw_8000" when `phoneNumber` is "assign-automatically"
|
|
121
|
+
audioSpeed: 1.1, // Must be between 0.5 and 1.5, multiple of 0.1
|
|
120
122
|
welcomeMessage: "Hello, how can I help you?",
|
|
121
123
|
systemPrompt: "You are an expert in {{subject}}. Be kind to {{user_name}}.",
|
|
122
124
|
templateVariables: {
|
|
@@ -154,6 +156,7 @@ const result = await phonic.agents.upsert({
|
|
|
154
156
|
timezone: "Australia/Melbourne",
|
|
155
157
|
voiceId: "sarah",
|
|
156
158
|
audioFormat: "mulaw_8000", // Must be "mulaw_8000" when `phoneNumber` is "assign-automatically"
|
|
159
|
+
audioSpeed: 1.1, // Defaults to 1.0. Must be between 0.5 and 1.5, multiple of 0.1
|
|
157
160
|
welcomeMessage: "Hello, how can I help you?",
|
|
158
161
|
systemPrompt: "You are an expert in {{subject}}. Be kind to {{user_name}}.",
|
|
159
162
|
templateVariables: {
|
package/dist/index.d.mts
CHANGED
|
@@ -115,6 +115,7 @@ interface PhonicSTSConfigBase {
|
|
|
115
115
|
input_format: "pcm_44100" | "mulaw_8000";
|
|
116
116
|
output_format?: "pcm_44100" | "mulaw_8000";
|
|
117
117
|
voice_id?: string;
|
|
118
|
+
audio_speed?: number;
|
|
118
119
|
welcome_message?: string;
|
|
119
120
|
system_prompt?: string;
|
|
120
121
|
template_variables?: Record<string, string>;
|
|
@@ -275,6 +276,7 @@ interface AgentOptionalParams {
|
|
|
275
276
|
project?: string;
|
|
276
277
|
timezone?: string;
|
|
277
278
|
voiceId?: string;
|
|
279
|
+
audioSpeed?: number;
|
|
278
280
|
welcomeMessage?: string;
|
|
279
281
|
systemPrompt?: string;
|
|
280
282
|
templateVariables?: Record<string, {
|
package/dist/index.d.ts
CHANGED
|
@@ -115,6 +115,7 @@ interface PhonicSTSConfigBase {
|
|
|
115
115
|
input_format: "pcm_44100" | "mulaw_8000";
|
|
116
116
|
output_format?: "pcm_44100" | "mulaw_8000";
|
|
117
117
|
voice_id?: string;
|
|
118
|
+
audio_speed?: number;
|
|
118
119
|
welcome_message?: string;
|
|
119
120
|
system_prompt?: string;
|
|
120
121
|
template_variables?: Record<string, string>;
|
|
@@ -275,6 +276,7 @@ interface AgentOptionalParams {
|
|
|
275
276
|
project?: string;
|
|
276
277
|
timezone?: string;
|
|
277
278
|
voiceId?: string;
|
|
279
|
+
audioSpeed?: number;
|
|
278
280
|
welcomeMessage?: string;
|
|
279
281
|
systemPrompt?: string;
|
|
280
282
|
templateVariables?: Record<string, {
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
|
|
37
37
|
// package.json
|
|
38
|
-
var version = "0.29.
|
|
38
|
+
var version = "0.29.2";
|
|
39
39
|
|
|
40
40
|
// src/agents/index.ts
|
|
41
41
|
var Agents = class {
|
|
@@ -92,6 +92,7 @@ var Agents = class {
|
|
|
92
92
|
phone_number: params.phoneNumber,
|
|
93
93
|
timezone: params.timezone,
|
|
94
94
|
audio_format: params.phoneNumber === "assign-automatically" ? "mulaw_8000" : params.audioFormat,
|
|
95
|
+
audio_speed: params.audioSpeed,
|
|
95
96
|
voice_id: params.voiceId,
|
|
96
97
|
welcome_message: params.welcomeMessage,
|
|
97
98
|
system_prompt: params.systemPrompt,
|
|
@@ -119,6 +120,7 @@ var Agents = class {
|
|
|
119
120
|
timezone: params.timezone,
|
|
120
121
|
audio_format: params.phoneNumber === "assign-automatically" ? "mulaw_8000" : params.audioFormat,
|
|
121
122
|
voice_id: params.voiceId,
|
|
123
|
+
audio_speed: params.audioSpeed,
|
|
122
124
|
welcome_message: params.welcomeMessage,
|
|
123
125
|
system_prompt: params.systemPrompt,
|
|
124
126
|
template_variables: this.getTemplateVariablesForBody(
|
|
@@ -147,6 +149,7 @@ var Agents = class {
|
|
|
147
149
|
voice_id: params.voiceId,
|
|
148
150
|
welcome_message: params.welcomeMessage,
|
|
149
151
|
system_prompt: params.systemPrompt,
|
|
152
|
+
audio_speed: params.audioSpeed,
|
|
150
153
|
template_variables: this.getTemplateVariablesForBody(
|
|
151
154
|
params.templateVariables
|
|
152
155
|
),
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.29.
|
|
2
|
+
var version = "0.29.2";
|
|
3
3
|
|
|
4
4
|
// src/agents/index.ts
|
|
5
5
|
var Agents = class {
|
|
@@ -56,6 +56,7 @@ var Agents = class {
|
|
|
56
56
|
phone_number: params.phoneNumber,
|
|
57
57
|
timezone: params.timezone,
|
|
58
58
|
audio_format: params.phoneNumber === "assign-automatically" ? "mulaw_8000" : params.audioFormat,
|
|
59
|
+
audio_speed: params.audioSpeed,
|
|
59
60
|
voice_id: params.voiceId,
|
|
60
61
|
welcome_message: params.welcomeMessage,
|
|
61
62
|
system_prompt: params.systemPrompt,
|
|
@@ -83,6 +84,7 @@ var Agents = class {
|
|
|
83
84
|
timezone: params.timezone,
|
|
84
85
|
audio_format: params.phoneNumber === "assign-automatically" ? "mulaw_8000" : params.audioFormat,
|
|
85
86
|
voice_id: params.voiceId,
|
|
87
|
+
audio_speed: params.audioSpeed,
|
|
86
88
|
welcome_message: params.welcomeMessage,
|
|
87
89
|
system_prompt: params.systemPrompt,
|
|
88
90
|
template_variables: this.getTemplateVariablesForBody(
|
|
@@ -111,6 +113,7 @@ var Agents = class {
|
|
|
111
113
|
voice_id: params.voiceId,
|
|
112
114
|
welcome_message: params.welcomeMessage,
|
|
113
115
|
system_prompt: params.systemPrompt,
|
|
116
|
+
audio_speed: params.audioSpeed,
|
|
114
117
|
template_variables: this.getTemplateVariablesForBody(
|
|
115
118
|
params.templateVariables
|
|
116
119
|
),
|