@copilotkit/voice 1.54.1 → 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,10 +1,15 @@
1
1
  # @copilotkit/voice
2
2
 
3
- ## 1.54.1
3
+ ## 1.55.0-next.7
4
+
5
+ ### Minor Changes
6
+
7
+ - 1ceb963: refactor: consolidate V1/V2 packages into flat @copilotkit/\* structure
4
8
 
5
9
  ### Patch Changes
6
10
 
7
- - @copilotkitnext/runtime@1.54.1
11
+ - Updated dependencies [1ceb963]
12
+ - @copilotkit/runtime@1.55.0-next.7
8
13
 
9
14
  ## 1.54.1-next.6
10
15
 
@@ -102,209 +107,209 @@
102
107
 
103
108
  ### Patch Changes
104
109
 
105
- - @copilotkitnext/runtime@1.53.1-next.2
110
+ - @copilotkit/runtime@1.53.1-next.2
106
111
 
107
112
  ## 1.53.1-next.1
108
113
 
109
114
  ### Patch Changes
110
115
 
111
- - @copilotkitnext/runtime@1.53.1-next.1
116
+ - @copilotkit/runtime@1.53.1-next.1
112
117
 
113
118
  ## 1.53.1-next.0
114
119
 
115
120
  ### Patch Changes
116
121
 
117
- - @copilotkitnext/runtime@1.53.1-next.0
122
+ - @copilotkit/runtime@1.53.1-next.0
118
123
 
119
124
  ## 1.53.0
120
125
 
121
126
  ### Patch Changes
122
127
 
123
128
  - Updated dependencies [1510f64]
124
- - @copilotkitnext/runtime@1.53.0
129
+ - @copilotkit/runtime@1.53.0
125
130
 
126
131
  ## 1.53.0-next.6
127
132
 
128
133
  ### Patch Changes
129
134
 
130
- - @copilotkitnext/runtime@1.53.0-next.6
135
+ - @copilotkit/runtime@1.53.0-next.6
131
136
 
132
137
  ## 1.53.0-next.5
133
138
 
134
139
  ### Patch Changes
135
140
 
136
- - @copilotkitnext/runtime@1.53.0-next.5
141
+ - @copilotkit/runtime@1.53.0-next.5
137
142
 
138
143
  ## 1.52.2-next.4
139
144
 
140
145
  ### Patch Changes
141
146
 
142
- - @copilotkitnext/runtime@1.52.2-next.4
147
+ - @copilotkit/runtime@1.52.2-next.4
143
148
 
144
149
  ## 1.52.2-next.3
145
150
 
146
151
  ### Patch Changes
147
152
 
148
153
  - Updated dependencies [1510f64]
149
- - @copilotkitnext/runtime@1.52.2-next.3
154
+ - @copilotkit/runtime@1.52.2-next.3
150
155
 
151
156
  ## 1.52.2-next.2
152
157
 
153
158
  ### Patch Changes
154
159
 
155
- - @copilotkitnext/runtime@1.52.2-next.2
160
+ - @copilotkit/runtime@1.52.2-next.2
156
161
 
157
162
  ## 1.52.2-next.1
158
163
 
159
164
  ### Patch Changes
160
165
 
161
- - @copilotkitnext/runtime@1.52.2-next.1
166
+ - @copilotkit/runtime@1.52.2-next.1
162
167
 
163
168
  ## 1.52.2-next.0
164
169
 
165
170
  ### Patch Changes
166
171
 
167
- - @copilotkitnext/runtime@1.52.2-next.0
172
+ - @copilotkit/runtime@1.52.2-next.0
168
173
 
169
174
  ## 1.52.1
170
175
 
171
176
  ### Patch Changes
172
177
 
173
- - @copilotkitnext/runtime@1.52.1
178
+ - @copilotkit/runtime@1.52.1
174
179
 
175
180
  ## 1.52.1-next.1
176
181
 
177
182
  ### Patch Changes
178
183
 
179
- - @copilotkitnext/runtime@1.52.1-next.1
184
+ - @copilotkit/runtime@1.52.1-next.1
180
185
 
181
186
  ## 1.52.1-next.0
182
187
 
183
188
  ### Patch Changes
184
189
 
185
- - @copilotkitnext/runtime@1.52.1-next.0
190
+ - @copilotkit/runtime@1.52.1-next.0
186
191
 
187
192
  ## 1.52.0
188
193
 
189
194
  ### Patch Changes
190
195
 
191
196
  - Updated dependencies [ef0f539]
192
- - @copilotkitnext/runtime@1.52.0
197
+ - @copilotkit/runtime@1.52.0
193
198
 
194
199
  ## 1.52.0-next.8
195
200
 
196
201
  ### Patch Changes
197
202
 
198
- - @copilotkitnext/runtime@1.52.0-next.8
203
+ - @copilotkit/runtime@1.52.0-next.8
199
204
 
200
205
  ## 1.52.0-next.7
201
206
 
202
207
  ### Patch Changes
203
208
 
204
- - @copilotkitnext/runtime@1.52.0-next.7
209
+ - @copilotkit/runtime@1.52.0-next.7
205
210
 
206
211
  ## 1.52.0-next.6
207
212
 
208
213
  ### Patch Changes
209
214
 
210
- - @copilotkitnext/runtime@1.52.0-next.6
215
+ - @copilotkit/runtime@1.52.0-next.6
211
216
 
212
217
  ## 1.52.0-next.5
213
218
 
214
219
  ### Patch Changes
215
220
 
216
- - @copilotkitnext/runtime@1.52.0-next.5
221
+ - @copilotkit/runtime@1.52.0-next.5
217
222
 
218
223
  ## 1.51.5-next.4
219
224
 
220
225
  ### Patch Changes
221
226
 
222
- - @copilotkitnext/runtime@1.51.5-next.4
227
+ - @copilotkit/runtime@1.51.5-next.4
223
228
 
224
229
  ## 1.51.5-next.3
225
230
 
226
231
  ### Patch Changes
227
232
 
228
- - @copilotkitnext/runtime@1.51.5-next.3
233
+ - @copilotkit/runtime@1.51.5-next.3
229
234
 
230
235
  ## 1.51.5-next.2
231
236
 
232
237
  ### Patch Changes
233
238
 
234
- - @copilotkitnext/runtime@1.51.5-next.2
239
+ - @copilotkit/runtime@1.51.5-next.2
235
240
 
236
241
  ## 1.51.5-next.1
237
242
 
238
243
  ### Patch Changes
239
244
 
240
- - @copilotkitnext/runtime@1.51.5-next.1
245
+ - @copilotkit/runtime@1.51.5-next.1
241
246
 
242
247
  ## 1.51.5-next.0
243
248
 
244
249
  ### Patch Changes
245
250
 
246
251
  - Updated dependencies [ef0f539]
247
- - @copilotkitnext/runtime@1.51.5-next.0
252
+ - @copilotkit/runtime@1.51.5-next.0
248
253
 
249
254
  ## 1.51.4
250
255
 
251
256
  ### Patch Changes
252
257
 
253
- - @copilotkitnext/runtime@1.51.4
258
+ - @copilotkit/runtime@1.51.4
254
259
 
255
260
  ## 1.51.4-next.8
256
261
 
257
262
  ### Patch Changes
258
263
 
259
- - @copilotkitnext/runtime@1.51.4-next.8
264
+ - @copilotkit/runtime@1.51.4-next.8
260
265
 
261
266
  ## 1.51.4-next.7
262
267
 
263
268
  ### Patch Changes
264
269
 
265
- - @copilotkitnext/runtime@1.51.4-next.7
270
+ - @copilotkit/runtime@1.51.4-next.7
266
271
 
267
272
  ## 1.51.4-next.6
268
273
 
269
274
  ### Patch Changes
270
275
 
271
- - @copilotkitnext/runtime@1.51.4-next.6
276
+ - @copilotkit/runtime@1.51.4-next.6
272
277
 
273
278
  ## 1.51.4-next.5
274
279
 
275
280
  ### Patch Changes
276
281
 
277
- - @copilotkitnext/runtime@1.51.4-next.5
282
+ - @copilotkit/runtime@1.51.4-next.5
278
283
 
279
284
  ## 1.51.4-next.4
280
285
 
281
286
  ### Patch Changes
282
287
 
283
- - @copilotkitnext/runtime@1.51.4-next.4
288
+ - @copilotkit/runtime@1.51.4-next.4
284
289
 
285
290
  ## 1.51.4-next.3
286
291
 
287
292
  ### Patch Changes
288
293
 
289
- - @copilotkitnext/runtime@1.51.4-next.3
294
+ - @copilotkit/runtime@1.51.4-next.3
290
295
 
291
296
  ## 1.51.4-next.2
292
297
 
293
298
  ### Patch Changes
294
299
 
295
- - @copilotkitnext/runtime@1.51.4-next.2
300
+ - @copilotkit/runtime@1.51.4-next.2
296
301
 
297
302
  ## 1.51.4-next.1
298
303
 
299
304
  ### Patch Changes
300
305
 
301
- - @copilotkitnext/runtime@1.51.4-next.1
306
+ - @copilotkit/runtime@1.51.4-next.1
302
307
 
303
308
  ## 1.51.4-next.0
304
309
 
305
310
  ### Patch Changes
306
311
 
307
- - @copilotkitnext/runtime@1.51.4-next.0
312
+ - @copilotkit/runtime@1.51.4-next.0
308
313
 
309
314
  ## 1.51.3
310
315
 
@@ -312,7 +317,7 @@
312
317
 
313
318
  - d36fc1e: Add UMD export
314
319
  - Updated dependencies [d36fc1e]
315
- - @copilotkitnext/runtime@1.51.3
320
+ - @copilotkit/runtime@1.51.3
316
321
 
317
322
  ## 1.51.3-next.8
318
323
 
@@ -320,52 +325,52 @@
320
325
 
321
326
  - d36fc1e: Add UMD export
322
327
  - Updated dependencies [d36fc1e]
323
- - @copilotkitnext/runtime@1.51.3-next.8
328
+ - @copilotkit/runtime@1.51.3-next.8
324
329
 
325
330
  ## 1.51.3-next.7
326
331
 
327
332
  ### Patch Changes
328
333
 
329
- - @copilotkitnext/runtime@1.51.3-next.7
334
+ - @copilotkit/runtime@1.51.3-next.7
330
335
 
331
336
  ## 1.51.3-next.6
332
337
 
333
338
  ### Patch Changes
334
339
 
335
- - @copilotkitnext/runtime@1.51.3-next.6
340
+ - @copilotkit/runtime@1.51.3-next.6
336
341
 
337
342
  ## 1.51.3-next.5
338
343
 
339
344
  ### Patch Changes
340
345
 
341
- - @copilotkitnext/runtime@1.51.3-next.5
346
+ - @copilotkit/runtime@1.51.3-next.5
342
347
 
343
348
  ## 1.51.3-next.4
344
349
 
345
350
  ### Patch Changes
346
351
 
347
- - @copilotkitnext/runtime@1.51.3-next.4
352
+ - @copilotkit/runtime@1.51.3-next.4
348
353
 
349
354
  ## 1.51.3-next.3
350
355
 
351
356
  ### Patch Changes
352
357
 
353
- - @copilotkitnext/runtime@1.51.3-next.3
358
+ - @copilotkit/runtime@1.51.3-next.3
354
359
 
355
360
  ## 1.51.3-next.2
356
361
 
357
362
  ### Patch Changes
358
363
 
359
- - @copilotkitnext/runtime@1.51.3-next.2
364
+ - @copilotkit/runtime@1.51.3-next.2
360
365
 
361
366
  ## 1.51.3-next.1
362
367
 
363
368
  ### Patch Changes
364
369
 
365
- - @copilotkitnext/runtime@1.51.3-next.1
370
+ - @copilotkit/runtime@1.51.3-next.1
366
371
 
367
372
  ## 1.51.3-next.0
368
373
 
369
374
  ### Patch Changes
370
375
 
371
- - @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",
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",
27
- "@copilotkitnext/typescript-config": "1.54.1"
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"
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;