@mastra/voice-openai-realtime 0.2.4-alpha.2 → 0.2.4-alpha.3

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.
@@ -1,23 +1,23 @@
1
1
 
2
- > @mastra/voice-openai-realtime@0.2.4-alpha.2 build /home/runner/work/mastra/mastra/voice/openai-realtime-api
2
+ > @mastra/voice-openai-realtime@0.2.4-alpha.3 build /home/runner/work/mastra/mastra/voice/openai-realtime-api
3
3
  > tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.4.0
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 10083ms
9
+ TSC ⚡️ Build success in 9136ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.8.3
13
13
  Writing package typings: /home/runner/work/mastra/mastra/voice/openai-realtime-api/dist/_tsup-dts-rollup.d.ts
14
14
  Analysis will use the bundled TypeScript version 5.8.3
15
15
  Writing package typings: /home/runner/work/mastra/mastra/voice/openai-realtime-api/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 12512ms
16
+ DTS ⚡️ Build success in 11791ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
- CJS dist/index.cjs 19.12 KB
21
- CJS ⚡️ Build success in 1001ms
22
- ESM dist/index.js 19.06 KB
23
- ESM ⚡️ Build success in 1002ms
20
+ CJS dist/index.cjs 19.08 KB
21
+ CJS ⚡️ Build success in 883ms
22
+ ESM dist/index.js 19.03 KB
23
+ ESM ⚡️ Build success in 884ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @mastra/voice-openai-realtime
2
2
 
3
+ ## 0.2.4-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [396be50]
8
+ - Updated dependencies [c3bd795]
9
+ - Updated dependencies [da082f8]
10
+ - Updated dependencies [a5810ce]
11
+ - @mastra/core@0.9.4-alpha.3
12
+
3
13
  ## 0.2.4-alpha.2
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -27,19 +27,15 @@ const voice = new OpenAIRealtimeVoice();
27
27
 
28
28
  // Create a voice instance with configuration
29
29
  const voice = new OpenAIRealtimeVoice({
30
- chatModel: {
31
- apiKey: 'your-api-key', // Optional, can use OPENAI_API_KEY env var
32
- model: 'gpt-4o-mini-realtime', // Optional, uses latest model by default
33
- options: {
34
- sessionConfig: {
35
- voice: 'alloy', // Default voice
36
- turn_detection: {
37
- type: 'server_vad',
38
- threshold: 0.5,
39
- silence_duration_ms: 1000,
40
- },
41
- },
42
- },
30
+ apiKey: 'your-api-key', // Optional, can use OPENAI_API_KEY env var
31
+ model: 'gpt-4o-mini-realtime', // Optional, uses latest model by default
32
+ });
33
+
34
+ voice.updateSession({
35
+ turn_detection: {
36
+ type: 'server_vad',
37
+ threshold: 0.5,
38
+ silence_duration_ms: 1000,
43
39
  },
44
40
  });
45
41
 
@@ -28,10 +28,8 @@ export declare type OpenAIExecuteFunction = (args: any) => Promise<any>;
28
28
  * @example
29
29
  * ```typescript
30
30
  * const voice = new OpenAIRealtimeVoice({
31
- * chatModel: {
32
- * apiKey: process.env.OPENAI_API_KEY,
33
- * model: 'gpt-4o-mini-realtime'
34
- * }
31
+ * apiKey: process.env.OPENAI_API_KEY,
32
+ * model: 'gpt-4o-mini-realtime'
35
33
  * });
36
34
  *
37
35
  * await voice.open();
@@ -66,10 +64,8 @@ export declare class OpenAIRealtimeVoice extends MastraVoice {
66
64
  * @example
67
65
  * ```typescript
68
66
  * const voice = new OpenAIRealtimeVoice({
69
- * chatModel: {
70
- * apiKey: 'your-api-key',
71
- * model: 'gpt-4o-mini-realtime',
72
- * },
67
+ * apiKey: 'your-api-key',
68
+ * model: 'gpt-4o-mini-realtime',
73
69
  * speaker: 'alloy'
74
70
  * });
75
71
  * ```
@@ -28,10 +28,8 @@ export declare type OpenAIExecuteFunction = (args: any) => Promise<any>;
28
28
  * @example
29
29
  * ```typescript
30
30
  * const voice = new OpenAIRealtimeVoice({
31
- * chatModel: {
32
- * apiKey: process.env.OPENAI_API_KEY,
33
- * model: 'gpt-4o-mini-realtime'
34
- * }
31
+ * apiKey: process.env.OPENAI_API_KEY,
32
+ * model: 'gpt-4o-mini-realtime'
35
33
  * });
36
34
  *
37
35
  * await voice.open();
@@ -66,10 +64,8 @@ export declare class OpenAIRealtimeVoice extends MastraVoice {
66
64
  * @example
67
65
  * ```typescript
68
66
  * const voice = new OpenAIRealtimeVoice({
69
- * chatModel: {
70
- * apiKey: 'your-api-key',
71
- * model: 'gpt-4o-mini-realtime',
72
- * },
67
+ * apiKey: 'your-api-key',
68
+ * model: 'gpt-4o-mini-realtime',
73
69
  * speaker: 'alloy'
74
70
  * });
75
71
  * ```
package/dist/index.cjs CHANGED
@@ -89,10 +89,8 @@ var OpenAIRealtimeVoice = class extends voice.MastraVoice {
89
89
  * @example
90
90
  * ```typescript
91
91
  * const voice = new OpenAIRealtimeVoice({
92
- * chatModel: {
93
- * apiKey: 'your-api-key',
94
- * model: 'gpt-4o-mini-realtime',
95
- * },
92
+ * apiKey: 'your-api-key',
93
+ * model: 'gpt-4o-mini-realtime',
96
94
  * speaker: 'alloy'
97
95
  * });
98
96
  * ```
package/dist/index.js CHANGED
@@ -87,10 +87,8 @@ var OpenAIRealtimeVoice = class extends MastraVoice {
87
87
  * @example
88
88
  * ```typescript
89
89
  * const voice = new OpenAIRealtimeVoice({
90
- * chatModel: {
91
- * apiKey: 'your-api-key',
92
- * model: 'gpt-4o-mini-realtime',
93
- * },
90
+ * apiKey: 'your-api-key',
91
+ * model: 'gpt-4o-mini-realtime',
94
92
  * speaker: 'alloy'
95
93
  * });
96
94
  * ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/voice-openai-realtime",
3
- "version": "0.2.4-alpha.2",
3
+ "version": "0.2.4-alpha.3",
4
4
  "description": "Mastra OpenAI Realtime API integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "openai-realtime-api": "^1.0.7",
24
24
  "ws": "^8.18.1",
25
25
  "zod-to-json-schema": "^3.24.5",
26
- "@mastra/core": "^0.9.4-alpha.2"
26
+ "@mastra/core": "^0.9.4-alpha.3"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@microsoft/api-extractor": "^7.52.5",
package/src/index.test.ts CHANGED
@@ -26,9 +26,7 @@ describe('OpenAIRealtimeVoice', () => {
26
26
  beforeEach(() => {
27
27
  vi.clearAllMocks();
28
28
  voice = new OpenAIRealtimeVoice({
29
- chatModel: {
30
- apiKey: 'test-api-key',
31
- },
29
+ apiKey: 'test-api-key',
32
30
  });
33
31
  mockClient = (voice as any).client;
34
32
  });
package/src/index.ts CHANGED
@@ -91,10 +91,8 @@ type RealtimeClientServerEventMap = {
91
91
  * @example
92
92
  * ```typescript
93
93
  * const voice = new OpenAIRealtimeVoice({
94
- * chatModel: {
95
- * apiKey: process.env.OPENAI_API_KEY,
96
- * model: 'gpt-4o-mini-realtime'
97
- * }
94
+ * apiKey: process.env.OPENAI_API_KEY,
95
+ * model: 'gpt-4o-mini-realtime'
98
96
  * });
99
97
  *
100
98
  * await voice.open();
@@ -129,10 +127,8 @@ export class OpenAIRealtimeVoice extends MastraVoice {
129
127
  * @example
130
128
  * ```typescript
131
129
  * const voice = new OpenAIRealtimeVoice({
132
- * chatModel: {
133
- * apiKey: 'your-api-key',
134
- * model: 'gpt-4o-mini-realtime',
135
- * },
130
+ * apiKey: 'your-api-key',
131
+ * model: 'gpt-4o-mini-realtime',
136
132
  * speaker: 'alloy'
137
133
  * });
138
134
  * ```