@copilotkit/voice 1.51.4 → 1.51.5-next.1

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,18 @@
1
1
  # @copilotkit/voice
2
2
 
3
+ ## 1.51.5-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - @copilotkitnext/runtime@1.51.5-next.1
8
+
9
+ ## 1.51.5-next.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [ef0f539]
14
+ - @copilotkitnext/runtime@1.51.5-next.0
15
+
3
16
  ## 1.51.4
4
17
 
5
18
  ### Patch Changes
@@ -0,0 +1,29 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
package/dist/index.cjs ADDED
@@ -0,0 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_transcription_service_openai = require('./transcription/transcription-service-openai.cjs');
3
+
4
+ exports.TranscriptionServiceOpenAI = require_transcription_service_openai.TranscriptionServiceOpenAI;
@@ -0,0 +1,2 @@
1
+ import { TranscriptionServiceOpenAI, TranscriptionServiceOpenAIConfig } from "./transcription/transcription-service-openai.cjs";
2
+ export { TranscriptionServiceOpenAI, TranscriptionServiceOpenAIConfig };
package/dist/index.d.mts CHANGED
@@ -1,38 +1,2 @@
1
- import { TranscriptionService, TranscribeFileOptions } from '@copilotkitnext/runtime';
2
- import OpenAI from 'openai';
3
-
4
- /**
5
- * Configuration options for the OpenAI transcription service.
6
- */
7
- interface TranscriptionServiceOpenAIConfig {
8
- /** OpenAI client instance. */
9
- openai: OpenAI;
10
- /** Whisper model to use. Defaults to "whisper-1". */
11
- model?: string;
12
- /**
13
- * Language of the audio in ISO-639-1 format (e.g., "en", "de", "fr").
14
- * Providing the language improves accuracy and latency.
15
- */
16
- language?: string;
17
- /**
18
- * Optional text to guide the model's style or continue a previous segment.
19
- * Should match the audio language.
20
- */
21
- prompt?: string;
22
- /**
23
- * Sampling temperature between 0 and 1.
24
- * Lower values are more deterministic, higher values more creative.
25
- */
26
- temperature?: number;
27
- }
28
- declare class TranscriptionServiceOpenAI extends TranscriptionService {
29
- private openai;
30
- private model;
31
- private language?;
32
- private prompt?;
33
- private temperature?;
34
- constructor(config: TranscriptionServiceOpenAIConfig);
35
- transcribeFile(options: TranscribeFileOptions): Promise<string>;
36
- }
37
-
38
- export { TranscriptionServiceOpenAI, type TranscriptionServiceOpenAIConfig };
1
+ import { TranscriptionServiceOpenAI, TranscriptionServiceOpenAIConfig } from "./transcription/transcription-service-openai.mjs";
2
+ export { TranscriptionServiceOpenAI, TranscriptionServiceOpenAIConfig };
package/dist/index.mjs CHANGED
@@ -1,34 +1,3 @@
1
- // src/transcription/transcription-service-openai.ts
2
- import {
3
- TranscriptionService
4
- } from "@copilotkitnext/runtime";
5
- import OpenAI from "openai";
6
- var TranscriptionServiceOpenAI = class extends TranscriptionService {
7
- openai;
8
- model;
9
- language;
10
- prompt;
11
- temperature;
12
- constructor(config) {
13
- super();
14
- this.openai = config.openai ?? new OpenAI();
15
- this.model = config.model ?? "whisper-1";
16
- this.language = config.language;
17
- this.prompt = config.prompt;
18
- this.temperature = config.temperature;
19
- }
20
- async transcribeFile(options) {
21
- const response = await this.openai.audio.transcriptions.create({
22
- file: options.audioFile,
23
- model: this.model,
24
- ...this.language && { language: this.language },
25
- ...this.prompt && { prompt: this.prompt },
26
- ...this.temperature !== void 0 && { temperature: this.temperature }
27
- });
28
- return response.text;
29
- }
30
- };
31
- export {
32
- TranscriptionServiceOpenAI
33
- };
34
- //# sourceMappingURL=index.mjs.map
1
+ import { TranscriptionServiceOpenAI } from "./transcription/transcription-service-openai.mjs";
2
+
3
+ export { TranscriptionServiceOpenAI };