@copilotkit/voice 1.54.1-next.6 → 1.55.0-next.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @copilotkit/voice
2
2
 
3
+ ## 1.55.0-next.7
4
+
5
+ ### Minor Changes
6
+
7
+ - 1ceb963: refactor: consolidate V1/V2 packages into flat @copilotkit/\* structure
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [1ceb963]
12
+ - @copilotkit/runtime@1.55.0-next.7
13
+
3
14
  ## 1.54.1-next.6
4
15
 
5
16
  ### Patch Changes
@@ -96,209 +107,209 @@
96
107
 
97
108
  ### Patch Changes
98
109
 
99
- - @copilotkitnext/runtime@1.53.1-next.2
110
+ - @copilotkit/runtime@1.53.1-next.2
100
111
 
101
112
  ## 1.53.1-next.1
102
113
 
103
114
  ### Patch Changes
104
115
 
105
- - @copilotkitnext/runtime@1.53.1-next.1
116
+ - @copilotkit/runtime@1.53.1-next.1
106
117
 
107
118
  ## 1.53.1-next.0
108
119
 
109
120
  ### Patch Changes
110
121
 
111
- - @copilotkitnext/runtime@1.53.1-next.0
122
+ - @copilotkit/runtime@1.53.1-next.0
112
123
 
113
124
  ## 1.53.0
114
125
 
115
126
  ### Patch Changes
116
127
 
117
128
  - Updated dependencies [1510f64]
118
- - @copilotkitnext/runtime@1.53.0
129
+ - @copilotkit/runtime@1.53.0
119
130
 
120
131
  ## 1.53.0-next.6
121
132
 
122
133
  ### Patch Changes
123
134
 
124
- - @copilotkitnext/runtime@1.53.0-next.6
135
+ - @copilotkit/runtime@1.53.0-next.6
125
136
 
126
137
  ## 1.53.0-next.5
127
138
 
128
139
  ### Patch Changes
129
140
 
130
- - @copilotkitnext/runtime@1.53.0-next.5
141
+ - @copilotkit/runtime@1.53.0-next.5
131
142
 
132
143
  ## 1.52.2-next.4
133
144
 
134
145
  ### Patch Changes
135
146
 
136
- - @copilotkitnext/runtime@1.52.2-next.4
147
+ - @copilotkit/runtime@1.52.2-next.4
137
148
 
138
149
  ## 1.52.2-next.3
139
150
 
140
151
  ### Patch Changes
141
152
 
142
153
  - Updated dependencies [1510f64]
143
- - @copilotkitnext/runtime@1.52.2-next.3
154
+ - @copilotkit/runtime@1.52.2-next.3
144
155
 
145
156
  ## 1.52.2-next.2
146
157
 
147
158
  ### Patch Changes
148
159
 
149
- - @copilotkitnext/runtime@1.52.2-next.2
160
+ - @copilotkit/runtime@1.52.2-next.2
150
161
 
151
162
  ## 1.52.2-next.1
152
163
 
153
164
  ### Patch Changes
154
165
 
155
- - @copilotkitnext/runtime@1.52.2-next.1
166
+ - @copilotkit/runtime@1.52.2-next.1
156
167
 
157
168
  ## 1.52.2-next.0
158
169
 
159
170
  ### Patch Changes
160
171
 
161
- - @copilotkitnext/runtime@1.52.2-next.0
172
+ - @copilotkit/runtime@1.52.2-next.0
162
173
 
163
174
  ## 1.52.1
164
175
 
165
176
  ### Patch Changes
166
177
 
167
- - @copilotkitnext/runtime@1.52.1
178
+ - @copilotkit/runtime@1.52.1
168
179
 
169
180
  ## 1.52.1-next.1
170
181
 
171
182
  ### Patch Changes
172
183
 
173
- - @copilotkitnext/runtime@1.52.1-next.1
184
+ - @copilotkit/runtime@1.52.1-next.1
174
185
 
175
186
  ## 1.52.1-next.0
176
187
 
177
188
  ### Patch Changes
178
189
 
179
- - @copilotkitnext/runtime@1.52.1-next.0
190
+ - @copilotkit/runtime@1.52.1-next.0
180
191
 
181
192
  ## 1.52.0
182
193
 
183
194
  ### Patch Changes
184
195
 
185
196
  - Updated dependencies [ef0f539]
186
- - @copilotkitnext/runtime@1.52.0
197
+ - @copilotkit/runtime@1.52.0
187
198
 
188
199
  ## 1.52.0-next.8
189
200
 
190
201
  ### Patch Changes
191
202
 
192
- - @copilotkitnext/runtime@1.52.0-next.8
203
+ - @copilotkit/runtime@1.52.0-next.8
193
204
 
194
205
  ## 1.52.0-next.7
195
206
 
196
207
  ### Patch Changes
197
208
 
198
- - @copilotkitnext/runtime@1.52.0-next.7
209
+ - @copilotkit/runtime@1.52.0-next.7
199
210
 
200
211
  ## 1.52.0-next.6
201
212
 
202
213
  ### Patch Changes
203
214
 
204
- - @copilotkitnext/runtime@1.52.0-next.6
215
+ - @copilotkit/runtime@1.52.0-next.6
205
216
 
206
217
  ## 1.52.0-next.5
207
218
 
208
219
  ### Patch Changes
209
220
 
210
- - @copilotkitnext/runtime@1.52.0-next.5
221
+ - @copilotkit/runtime@1.52.0-next.5
211
222
 
212
223
  ## 1.51.5-next.4
213
224
 
214
225
  ### Patch Changes
215
226
 
216
- - @copilotkitnext/runtime@1.51.5-next.4
227
+ - @copilotkit/runtime@1.51.5-next.4
217
228
 
218
229
  ## 1.51.5-next.3
219
230
 
220
231
  ### Patch Changes
221
232
 
222
- - @copilotkitnext/runtime@1.51.5-next.3
233
+ - @copilotkit/runtime@1.51.5-next.3
223
234
 
224
235
  ## 1.51.5-next.2
225
236
 
226
237
  ### Patch Changes
227
238
 
228
- - @copilotkitnext/runtime@1.51.5-next.2
239
+ - @copilotkit/runtime@1.51.5-next.2
229
240
 
230
241
  ## 1.51.5-next.1
231
242
 
232
243
  ### Patch Changes
233
244
 
234
- - @copilotkitnext/runtime@1.51.5-next.1
245
+ - @copilotkit/runtime@1.51.5-next.1
235
246
 
236
247
  ## 1.51.5-next.0
237
248
 
238
249
  ### Patch Changes
239
250
 
240
251
  - Updated dependencies [ef0f539]
241
- - @copilotkitnext/runtime@1.51.5-next.0
252
+ - @copilotkit/runtime@1.51.5-next.0
242
253
 
243
254
  ## 1.51.4
244
255
 
245
256
  ### Patch Changes
246
257
 
247
- - @copilotkitnext/runtime@1.51.4
258
+ - @copilotkit/runtime@1.51.4
248
259
 
249
260
  ## 1.51.4-next.8
250
261
 
251
262
  ### Patch Changes
252
263
 
253
- - @copilotkitnext/runtime@1.51.4-next.8
264
+ - @copilotkit/runtime@1.51.4-next.8
254
265
 
255
266
  ## 1.51.4-next.7
256
267
 
257
268
  ### Patch Changes
258
269
 
259
- - @copilotkitnext/runtime@1.51.4-next.7
270
+ - @copilotkit/runtime@1.51.4-next.7
260
271
 
261
272
  ## 1.51.4-next.6
262
273
 
263
274
  ### Patch Changes
264
275
 
265
- - @copilotkitnext/runtime@1.51.4-next.6
276
+ - @copilotkit/runtime@1.51.4-next.6
266
277
 
267
278
  ## 1.51.4-next.5
268
279
 
269
280
  ### Patch Changes
270
281
 
271
- - @copilotkitnext/runtime@1.51.4-next.5
282
+ - @copilotkit/runtime@1.51.4-next.5
272
283
 
273
284
  ## 1.51.4-next.4
274
285
 
275
286
  ### Patch Changes
276
287
 
277
- - @copilotkitnext/runtime@1.51.4-next.4
288
+ - @copilotkit/runtime@1.51.4-next.4
278
289
 
279
290
  ## 1.51.4-next.3
280
291
 
281
292
  ### Patch Changes
282
293
 
283
- - @copilotkitnext/runtime@1.51.4-next.3
294
+ - @copilotkit/runtime@1.51.4-next.3
284
295
 
285
296
  ## 1.51.4-next.2
286
297
 
287
298
  ### Patch Changes
288
299
 
289
- - @copilotkitnext/runtime@1.51.4-next.2
300
+ - @copilotkit/runtime@1.51.4-next.2
290
301
 
291
302
  ## 1.51.4-next.1
292
303
 
293
304
  ### Patch Changes
294
305
 
295
- - @copilotkitnext/runtime@1.51.4-next.1
306
+ - @copilotkit/runtime@1.51.4-next.1
296
307
 
297
308
  ## 1.51.4-next.0
298
309
 
299
310
  ### Patch Changes
300
311
 
301
- - @copilotkitnext/runtime@1.51.4-next.0
312
+ - @copilotkit/runtime@1.51.4-next.0
302
313
 
303
314
  ## 1.51.3
304
315
 
@@ -306,7 +317,7 @@
306
317
 
307
318
  - d36fc1e: Add UMD export
308
319
  - Updated dependencies [d36fc1e]
309
- - @copilotkitnext/runtime@1.51.3
320
+ - @copilotkit/runtime@1.51.3
310
321
 
311
322
  ## 1.51.3-next.8
312
323
 
@@ -314,52 +325,52 @@
314
325
 
315
326
  - d36fc1e: Add UMD export
316
327
  - Updated dependencies [d36fc1e]
317
- - @copilotkitnext/runtime@1.51.3-next.8
328
+ - @copilotkit/runtime@1.51.3-next.8
318
329
 
319
330
  ## 1.51.3-next.7
320
331
 
321
332
  ### Patch Changes
322
333
 
323
- - @copilotkitnext/runtime@1.51.3-next.7
334
+ - @copilotkit/runtime@1.51.3-next.7
324
335
 
325
336
  ## 1.51.3-next.6
326
337
 
327
338
  ### Patch Changes
328
339
 
329
- - @copilotkitnext/runtime@1.51.3-next.6
340
+ - @copilotkit/runtime@1.51.3-next.6
330
341
 
331
342
  ## 1.51.3-next.5
332
343
 
333
344
  ### Patch Changes
334
345
 
335
- - @copilotkitnext/runtime@1.51.3-next.5
346
+ - @copilotkit/runtime@1.51.3-next.5
336
347
 
337
348
  ## 1.51.3-next.4
338
349
 
339
350
  ### Patch Changes
340
351
 
341
- - @copilotkitnext/runtime@1.51.3-next.4
352
+ - @copilotkit/runtime@1.51.3-next.4
342
353
 
343
354
  ## 1.51.3-next.3
344
355
 
345
356
  ### Patch Changes
346
357
 
347
- - @copilotkitnext/runtime@1.51.3-next.3
358
+ - @copilotkit/runtime@1.51.3-next.3
348
359
 
349
360
  ## 1.51.3-next.2
350
361
 
351
362
  ### Patch Changes
352
363
 
353
- - @copilotkitnext/runtime@1.51.3-next.2
364
+ - @copilotkit/runtime@1.51.3-next.2
354
365
 
355
366
  ## 1.51.3-next.1
356
367
 
357
368
  ### Patch Changes
358
369
 
359
- - @copilotkitnext/runtime@1.51.3-next.1
370
+ - @copilotkit/runtime@1.51.3-next.1
360
371
 
361
372
  ## 1.51.3-next.0
362
373
 
363
374
  ### Patch Changes
364
375
 
365
- - @copilotkitnext/runtime@1.51.3-next.0
376
+ - @copilotkit/runtime@1.51.3-next.0
package/README.md CHANGED
@@ -9,7 +9,7 @@ pnpm add @copilotkit/voice openai
9
9
  ```
10
10
 
11
11
  ```typescript
12
- import { CopilotRuntime, createCopilotEndpoint } from "@copilotkitnext/runtime";
12
+ import { CopilotRuntime, createCopilotEndpoint } from "@copilotkit/runtime";
13
13
  import { TranscriptionServiceOpenAI } from "@copilotkit/voice";
14
14
  import OpenAI from "openai";
15
15
 
@@ -45,7 +45,7 @@ Extend `TranscriptionService` from runtime:
45
45
  import {
46
46
  TranscriptionService,
47
47
  TranscribeFileOptions,
48
- } from "@copilotkitnext/runtime";
48
+ } from "@copilotkit/runtime";
49
49
 
50
50
  class MyTranscriptionService extends TranscriptionService {
51
51
  async transcribeFile(options: TranscribeFileOptions): Promise<string> {
package/dist/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function(global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@copilotkitnext/runtime'), require('openai')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@copilotkitnext/runtime', 'openai'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CopilotKitVoice = {}), global.CopilotKitNextRuntime,global.openai));
5
- })(this, function(exports, _copilotkitnext_runtime, openai) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@copilotkit/runtime/v2'), require('openai')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@copilotkit/runtime/v2', 'openai'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CopilotKitVoice = {}), global._copilotkit_runtime_v2,global.openai));
5
+ })(this, function(exports, _copilotkit_runtime_v2, openai) {
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
7
7
  //#region \0rolldown/runtime.js
8
8
  var __create = Object.create;
@@ -76,7 +76,7 @@ openai = __toESM(openai);
76
76
 
77
77
  //#endregion
78
78
  //#region src/transcription/transcription-service-openai.ts
79
- var TranscriptionServiceOpenAI = class extends _copilotkitnext_runtime.TranscriptionService {
79
+ var TranscriptionServiceOpenAI = class extends _copilotkit_runtime_v2.TranscriptionService {
80
80
  constructor(config) {
81
81
  var _config$openai, _config$model;
82
82
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","names":["TranscriptionService","OpenAI"],"sources":["../src/transcription/transcription-service-openai.ts"],"sourcesContent":["import {\n TranscribeFileOptions,\n TranscriptionService,\n} from \"@copilotkitnext/runtime\";\nimport OpenAI from \"openai\";\n\n/**\n * Configuration options for the OpenAI transcription service.\n */\nexport interface TranscriptionServiceOpenAIConfig {\n /** OpenAI client instance. */\n openai: OpenAI;\n /** Whisper model to use. Defaults to \"whisper-1\". */\n model?: string;\n /**\n * Language of the audio in ISO-639-1 format (e.g., \"en\", \"de\", \"fr\").\n * Providing the language improves accuracy and latency.\n */\n language?: string;\n /**\n * Optional text to guide the model's style or continue a previous segment.\n * Should match the audio language.\n */\n prompt?: string;\n /**\n * Sampling temperature between 0 and 1.\n * Lower values are more deterministic, higher values more creative.\n */\n temperature?: number;\n}\n\nexport class TranscriptionServiceOpenAI extends TranscriptionService {\n private openai: OpenAI;\n private model: string;\n private language?: string;\n private prompt?: string;\n private temperature?: number;\n\n constructor(config: TranscriptionServiceOpenAIConfig) {\n super();\n this.openai = config.openai ?? new OpenAI();\n this.model = config.model ?? \"whisper-1\";\n this.language = config.language;\n this.prompt = config.prompt;\n this.temperature = config.temperature;\n }\n\n async transcribeFile(options: TranscribeFileOptions): Promise<string> {\n const response = await this.openai.audio.transcriptions.create({\n file: options.audioFile,\n model: this.model,\n ...(this.language && { language: this.language }),\n ...(this.prompt && { prompt: this.prompt }),\n ...(this.temperature !== undefined && { temperature: this.temperature }),\n });\n return response.text;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BA,IAAa,6BAAb,cAAgDA,6CAAqB;EAOnE,YAAY,QAA0C;;AACpD,UAAO;yBAPD;yBACA;yBACA;yBACA;yBACA;AAIN,QAAK,2BAAS,OAAO,iEAAU,IAAIC,gBAAQ;AAC3C,QAAK,yBAAQ,OAAO,8DAAS;AAC7B,QAAK,WAAW,OAAO;AACvB,QAAK,SAAS,OAAO;AACrB,QAAK,cAAc,OAAO;;EAG5B,MAAM,eAAe,SAAiD;AAQpE,WAPiB,MAAM,KAAK,OAAO,MAAM,eAAe,OAAO;IAC7D,MAAM,QAAQ;IACd,OAAO,KAAK;IACZ,GAAI,KAAK,YAAY,EAAE,UAAU,KAAK,UAAU;IAChD,GAAI,KAAK,UAAU,EAAE,QAAQ,KAAK,QAAQ;IAC1C,GAAI,KAAK,gBAAgB,UAAa,EAAE,aAAa,KAAK,aAAa;IACxE,CAAC,EACc"}
1
+ {"version":3,"file":"index.umd.js","names":["TranscriptionService","OpenAI"],"sources":["../src/transcription/transcription-service-openai.ts"],"sourcesContent":["import {\n TranscribeFileOptions,\n TranscriptionService,\n} from \"@copilotkit/runtime/v2\";\nimport OpenAI from \"openai\";\n\n/**\n * Configuration options for the OpenAI transcription service.\n */\nexport interface TranscriptionServiceOpenAIConfig {\n /** OpenAI client instance. */\n openai: OpenAI;\n /** Whisper model to use. Defaults to \"whisper-1\". */\n model?: string;\n /**\n * Language of the audio in ISO-639-1 format (e.g., \"en\", \"de\", \"fr\").\n * Providing the language improves accuracy and latency.\n */\n language?: string;\n /**\n * Optional text to guide the model's style or continue a previous segment.\n * Should match the audio language.\n */\n prompt?: string;\n /**\n * Sampling temperature between 0 and 1.\n * Lower values are more deterministic, higher values more creative.\n */\n temperature?: number;\n}\n\nexport class TranscriptionServiceOpenAI extends TranscriptionService {\n private openai: OpenAI;\n private model: string;\n private language?: string;\n private prompt?: string;\n private temperature?: number;\n\n constructor(config: TranscriptionServiceOpenAIConfig) {\n super();\n this.openai = config.openai ?? new OpenAI();\n this.model = config.model ?? \"whisper-1\";\n this.language = config.language;\n this.prompt = config.prompt;\n this.temperature = config.temperature;\n }\n\n async transcribeFile(options: TranscribeFileOptions): Promise<string> {\n const response = await this.openai.audio.transcriptions.create({\n file: options.audioFile,\n model: this.model,\n ...(this.language && { language: this.language }),\n ...(this.prompt && { prompt: this.prompt }),\n ...(this.temperature !== undefined && { temperature: this.temperature }),\n });\n return response.text;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BA,IAAa,6BAAb,cAAgDA,4CAAqB;EAOnE,YAAY,QAA0C;;AACpD,UAAO;yBAPD;yBACA;yBACA;yBACA;yBACA;AAIN,QAAK,2BAAS,OAAO,iEAAU,IAAIC,gBAAQ;AAC3C,QAAK,yBAAQ,OAAO,8DAAS;AAC7B,QAAK,WAAW,OAAO;AACvB,QAAK,SAAS,OAAO;AACrB,QAAK,cAAc,OAAO;;EAG5B,MAAM,eAAe,SAAiD;AAQpE,WAPiB,MAAM,KAAK,OAAO,MAAM,eAAe,OAAO;IAC7D,MAAM,QAAQ;IACd,OAAO,KAAK;IACZ,GAAI,KAAK,YAAY,EAAE,UAAU,KAAK,UAAU;IAChD,GAAI,KAAK,UAAU,EAAE,QAAQ,KAAK,QAAQ;IAC1C,GAAI,KAAK,gBAAgB,UAAa,EAAE,aAAa,KAAK,aAAa;IACxE,CAAC,EACc"}
@@ -1,10 +1,10 @@
1
1
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
- let _copilotkitnext_runtime = require("@copilotkitnext/runtime");
2
+ let _copilotkit_runtime_v2 = require("@copilotkit/runtime/v2");
3
3
  let openai = require("openai");
4
4
  openai = require_runtime.__toESM(openai);
5
5
 
6
6
  //#region src/transcription/transcription-service-openai.ts
7
- var TranscriptionServiceOpenAI = class extends _copilotkitnext_runtime.TranscriptionService {
7
+ var TranscriptionServiceOpenAI = class extends _copilotkit_runtime_v2.TranscriptionService {
8
8
  openai;
9
9
  model;
10
10
  language;
@@ -1 +1 @@
1
- {"version":3,"file":"transcription-service-openai.cjs","names":["TranscriptionService","OpenAI"],"sources":["../../src/transcription/transcription-service-openai.ts"],"sourcesContent":["import {\n TranscribeFileOptions,\n TranscriptionService,\n} from \"@copilotkitnext/runtime\";\nimport OpenAI from \"openai\";\n\n/**\n * Configuration options for the OpenAI transcription service.\n */\nexport interface TranscriptionServiceOpenAIConfig {\n /** OpenAI client instance. */\n openai: OpenAI;\n /** Whisper model to use. Defaults to \"whisper-1\". */\n model?: string;\n /**\n * Language of the audio in ISO-639-1 format (e.g., \"en\", \"de\", \"fr\").\n * Providing the language improves accuracy and latency.\n */\n language?: string;\n /**\n * Optional text to guide the model's style or continue a previous segment.\n * Should match the audio language.\n */\n prompt?: string;\n /**\n * Sampling temperature between 0 and 1.\n * Lower values are more deterministic, higher values more creative.\n */\n temperature?: number;\n}\n\nexport class TranscriptionServiceOpenAI extends TranscriptionService {\n private openai: OpenAI;\n private model: string;\n private language?: string;\n private prompt?: string;\n private temperature?: number;\n\n constructor(config: TranscriptionServiceOpenAIConfig) {\n super();\n this.openai = config.openai ?? new OpenAI();\n this.model = config.model ?? \"whisper-1\";\n this.language = config.language;\n this.prompt = config.prompt;\n this.temperature = config.temperature;\n }\n\n async transcribeFile(options: TranscribeFileOptions): Promise<string> {\n const response = await this.openai.audio.transcriptions.create({\n file: options.audioFile,\n model: this.model,\n ...(this.language && { language: this.language }),\n ...(this.prompt && { prompt: this.prompt }),\n ...(this.temperature !== undefined && { temperature: this.temperature }),\n });\n return response.text;\n }\n}\n"],"mappings":";;;;;;AA+BA,IAAa,6BAAb,cAAgDA,6CAAqB;CACnE,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,YAAY,QAA0C;AACpD,SAAO;AACP,OAAK,SAAS,OAAO,UAAU,IAAIC,gBAAQ;AAC3C,OAAK,QAAQ,OAAO,SAAS;AAC7B,OAAK,WAAW,OAAO;AACvB,OAAK,SAAS,OAAO;AACrB,OAAK,cAAc,OAAO;;CAG5B,MAAM,eAAe,SAAiD;AAQpE,UAPiB,MAAM,KAAK,OAAO,MAAM,eAAe,OAAO;GAC7D,MAAM,QAAQ;GACd,OAAO,KAAK;GACZ,GAAI,KAAK,YAAY,EAAE,UAAU,KAAK,UAAU;GAChD,GAAI,KAAK,UAAU,EAAE,QAAQ,KAAK,QAAQ;GAC1C,GAAI,KAAK,gBAAgB,UAAa,EAAE,aAAa,KAAK,aAAa;GACxE,CAAC,EACc"}
1
+ {"version":3,"file":"transcription-service-openai.cjs","names":["TranscriptionService","OpenAI"],"sources":["../../src/transcription/transcription-service-openai.ts"],"sourcesContent":["import {\n TranscribeFileOptions,\n TranscriptionService,\n} from \"@copilotkit/runtime/v2\";\nimport OpenAI from \"openai\";\n\n/**\n * Configuration options for the OpenAI transcription service.\n */\nexport interface TranscriptionServiceOpenAIConfig {\n /** OpenAI client instance. */\n openai: OpenAI;\n /** Whisper model to use. Defaults to \"whisper-1\". */\n model?: string;\n /**\n * Language of the audio in ISO-639-1 format (e.g., \"en\", \"de\", \"fr\").\n * Providing the language improves accuracy and latency.\n */\n language?: string;\n /**\n * Optional text to guide the model's style or continue a previous segment.\n * Should match the audio language.\n */\n prompt?: string;\n /**\n * Sampling temperature between 0 and 1.\n * Lower values are more deterministic, higher values more creative.\n */\n temperature?: number;\n}\n\nexport class TranscriptionServiceOpenAI extends TranscriptionService {\n private openai: OpenAI;\n private model: string;\n private language?: string;\n private prompt?: string;\n private temperature?: number;\n\n constructor(config: TranscriptionServiceOpenAIConfig) {\n super();\n this.openai = config.openai ?? new OpenAI();\n this.model = config.model ?? \"whisper-1\";\n this.language = config.language;\n this.prompt = config.prompt;\n this.temperature = config.temperature;\n }\n\n async transcribeFile(options: TranscribeFileOptions): Promise<string> {\n const response = await this.openai.audio.transcriptions.create({\n file: options.audioFile,\n model: this.model,\n ...(this.language && { language: this.language }),\n ...(this.prompt && { prompt: this.prompt }),\n ...(this.temperature !== undefined && { temperature: this.temperature }),\n });\n return response.text;\n }\n}\n"],"mappings":";;;;;;AA+BA,IAAa,6BAAb,cAAgDA,4CAAqB;CACnE,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,YAAY,QAA0C;AACpD,SAAO;AACP,OAAK,SAAS,OAAO,UAAU,IAAIC,gBAAQ;AAC3C,OAAK,QAAQ,OAAO,SAAS;AAC7B,OAAK,WAAW,OAAO;AACvB,OAAK,SAAS,OAAO;AACrB,OAAK,cAAc,OAAO;;CAG5B,MAAM,eAAe,SAAiD;AAQpE,UAPiB,MAAM,KAAK,OAAO,MAAM,eAAe,OAAO;GAC7D,MAAM,QAAQ;GACd,OAAO,KAAK;GACZ,GAAI,KAAK,YAAY,EAAE,UAAU,KAAK,UAAU;GAChD,GAAI,KAAK,UAAU,EAAE,QAAQ,KAAK,QAAQ;GAC1C,GAAI,KAAK,gBAAgB,UAAa,EAAE,aAAa,KAAK,aAAa;GACxE,CAAC,EACc"}
@@ -1,4 +1,4 @@
1
- import { TranscribeFileOptions, TranscriptionService } from "@copilotkitnext/runtime";
1
+ import { TranscribeFileOptions, TranscriptionService } from "@copilotkit/runtime/v2";
2
2
  import OpenAI from "openai";
3
3
 
4
4
  //#region src/transcription/transcription-service-openai.d.ts
@@ -1,4 +1,4 @@
1
- import { TranscribeFileOptions, TranscriptionService } from "@copilotkitnext/runtime";
1
+ import { TranscribeFileOptions, TranscriptionService } from "@copilotkit/runtime/v2";
2
2
  import OpenAI from "openai";
3
3
 
4
4
  //#region src/transcription/transcription-service-openai.d.ts
@@ -1,4 +1,4 @@
1
- import { TranscriptionService } from "@copilotkitnext/runtime";
1
+ import { TranscriptionService } from "@copilotkit/runtime/v2";
2
2
  import OpenAI from "openai";
3
3
 
4
4
  //#region src/transcription/transcription-service-openai.ts
@@ -1 +1 @@
1
- {"version":3,"file":"transcription-service-openai.mjs","names":[],"sources":["../../src/transcription/transcription-service-openai.ts"],"sourcesContent":["import {\n TranscribeFileOptions,\n TranscriptionService,\n} from \"@copilotkitnext/runtime\";\nimport OpenAI from \"openai\";\n\n/**\n * Configuration options for the OpenAI transcription service.\n */\nexport interface TranscriptionServiceOpenAIConfig {\n /** OpenAI client instance. */\n openai: OpenAI;\n /** Whisper model to use. Defaults to \"whisper-1\". */\n model?: string;\n /**\n * Language of the audio in ISO-639-1 format (e.g., \"en\", \"de\", \"fr\").\n * Providing the language improves accuracy and latency.\n */\n language?: string;\n /**\n * Optional text to guide the model's style or continue a previous segment.\n * Should match the audio language.\n */\n prompt?: string;\n /**\n * Sampling temperature between 0 and 1.\n * Lower values are more deterministic, higher values more creative.\n */\n temperature?: number;\n}\n\nexport class TranscriptionServiceOpenAI extends TranscriptionService {\n private openai: OpenAI;\n private model: string;\n private language?: string;\n private prompt?: string;\n private temperature?: number;\n\n constructor(config: TranscriptionServiceOpenAIConfig) {\n super();\n this.openai = config.openai ?? new OpenAI();\n this.model = config.model ?? \"whisper-1\";\n this.language = config.language;\n this.prompt = config.prompt;\n this.temperature = config.temperature;\n }\n\n async transcribeFile(options: TranscribeFileOptions): Promise<string> {\n const response = await this.openai.audio.transcriptions.create({\n file: options.audioFile,\n model: this.model,\n ...(this.language && { language: this.language }),\n ...(this.prompt && { prompt: this.prompt }),\n ...(this.temperature !== undefined && { temperature: this.temperature }),\n });\n return response.text;\n }\n}\n"],"mappings":";;;;AA+BA,IAAa,6BAAb,cAAgD,qBAAqB;CACnE,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,YAAY,QAA0C;AACpD,SAAO;AACP,OAAK,SAAS,OAAO,UAAU,IAAI,QAAQ;AAC3C,OAAK,QAAQ,OAAO,SAAS;AAC7B,OAAK,WAAW,OAAO;AACvB,OAAK,SAAS,OAAO;AACrB,OAAK,cAAc,OAAO;;CAG5B,MAAM,eAAe,SAAiD;AAQpE,UAPiB,MAAM,KAAK,OAAO,MAAM,eAAe,OAAO;GAC7D,MAAM,QAAQ;GACd,OAAO,KAAK;GACZ,GAAI,KAAK,YAAY,EAAE,UAAU,KAAK,UAAU;GAChD,GAAI,KAAK,UAAU,EAAE,QAAQ,KAAK,QAAQ;GAC1C,GAAI,KAAK,gBAAgB,UAAa,EAAE,aAAa,KAAK,aAAa;GACxE,CAAC,EACc"}
1
+ {"version":3,"file":"transcription-service-openai.mjs","names":[],"sources":["../../src/transcription/transcription-service-openai.ts"],"sourcesContent":["import {\n TranscribeFileOptions,\n TranscriptionService,\n} from \"@copilotkit/runtime/v2\";\nimport OpenAI from \"openai\";\n\n/**\n * Configuration options for the OpenAI transcription service.\n */\nexport interface TranscriptionServiceOpenAIConfig {\n /** OpenAI client instance. */\n openai: OpenAI;\n /** Whisper model to use. Defaults to \"whisper-1\". */\n model?: string;\n /**\n * Language of the audio in ISO-639-1 format (e.g., \"en\", \"de\", \"fr\").\n * Providing the language improves accuracy and latency.\n */\n language?: string;\n /**\n * Optional text to guide the model's style or continue a previous segment.\n * Should match the audio language.\n */\n prompt?: string;\n /**\n * Sampling temperature between 0 and 1.\n * Lower values are more deterministic, higher values more creative.\n */\n temperature?: number;\n}\n\nexport class TranscriptionServiceOpenAI extends TranscriptionService {\n private openai: OpenAI;\n private model: string;\n private language?: string;\n private prompt?: string;\n private temperature?: number;\n\n constructor(config: TranscriptionServiceOpenAIConfig) {\n super();\n this.openai = config.openai ?? new OpenAI();\n this.model = config.model ?? \"whisper-1\";\n this.language = config.language;\n this.prompt = config.prompt;\n this.temperature = config.temperature;\n }\n\n async transcribeFile(options: TranscribeFileOptions): Promise<string> {\n const response = await this.openai.audio.transcriptions.create({\n file: options.audioFile,\n model: this.model,\n ...(this.language && { language: this.language }),\n ...(this.prompt && { prompt: this.prompt }),\n ...(this.temperature !== undefined && { temperature: this.temperature }),\n });\n return response.text;\n }\n}\n"],"mappings":";;;;AA+BA,IAAa,6BAAb,cAAgD,qBAAqB;CACnE,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAER,YAAY,QAA0C;AACpD,SAAO;AACP,OAAK,SAAS,OAAO,UAAU,IAAI,QAAQ;AAC3C,OAAK,QAAQ,OAAO,SAAS;AAC7B,OAAK,WAAW,OAAO;AACvB,OAAK,SAAS,OAAO;AACrB,OAAK,cAAc,OAAO;;CAG5B,MAAM,eAAe,SAAiD;AAQpE,UAPiB,MAAM,KAAK,OAAO,MAAM,eAAe,OAAO;GAC7D,MAAM,QAAQ;GACd,OAAO,KAAK;GACZ,GAAI,KAAK,YAAY,EAAE,UAAU,KAAK,UAAU;GAChD,GAAI,KAAK,UAAU,EAAE,QAAQ,KAAK,QAAQ;GAC1C,GAAI,KAAK,gBAAgB,UAAa,EAAE,aAAa,KAAK,aAAa;GACxE,CAAC,EACc"}
package/eslint.config.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { config as baseConfig } from "@copilotkitnext/eslint-config/base";
1
+ import { config as baseConfig } from "@copilotkit/eslint-config/base";
2
2
 
3
3
  export default [...baseConfig];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@copilotkit/voice",
3
- "version": "1.54.1-next.6",
3
+ "version": "1.55.0-next.7",
4
4
  "description": "Voice services for CopilotKit (transcription, text-to-speech, etc.)",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",
@@ -23,12 +23,12 @@
23
23
  "tsdown": "^0.20.3",
24
24
  "typescript": "5.8.2",
25
25
  "vitest": "^3.0.5",
26
- "@copilotkitnext/eslint-config": "1.54.1-next.6",
27
- "@copilotkitnext/typescript-config": "1.54.1-next.6"
26
+ "@copilotkit/eslint-config": "1.55.0-next.7",
27
+ "@copilotkit/typescript-config": "1.55.0-next.7"
28
28
  },
29
29
  "dependencies": {
30
30
  "openai": "^5.9.0",
31
- "@copilotkitnext/runtime": "1.54.1-next.6"
31
+ "@copilotkit/runtime": "1.55.0-next.7"
32
32
  },
33
33
  "engines": {
34
34
  "node": ">=18"
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TranscribeFileOptions,
3
3
  TranscriptionService,
4
- } from "@copilotkitnext/runtime";
4
+ } from "@copilotkit/runtime/v2";
5
5
  import OpenAI from "openai";
6
6
 
7
7
  /**
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "@copilotkitnext/typescript-config/base.json",
2
+ "extends": "@copilotkit/typescript-config/base.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "dist",
5
5
  "rootDir": "src",
package/tsdown.config.ts CHANGED
@@ -26,7 +26,7 @@ export default defineConfig([
26
26
  outputOptions(options) {
27
27
  options.entryFileNames = "[name].umd.js";
28
28
  options.globals = {
29
- "@copilotkitnext/runtime": "CopilotKitNextRuntime",
29
+ "@copilotkit/runtime": "CopilotKitRuntime",
30
30
  openai: "openai",
31
31
  };
32
32
  return options;