@mastra/voice-openai-realtime 0.2.0-alpha.3 → 0.2.0-alpha.4
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +6 -0
- package/dist/_tsup-dts-rollup.d.cts +1 -0
- package/dist/_tsup-dts-rollup.d.ts +1 -0
- package/dist/index.cjs +5 -2
- package/dist/index.js +5 -2
- package/package.json +1 -1
- package/src/index.ts +6 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/voice-openai-realtime@0.2.0-alpha.
|
|
2
|
+
> @mastra/voice-openai-realtime@0.2.0-alpha.4 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
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.4.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 7973ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/voice/openai-realtime-api/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/voice/openai-realtime-api/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 10979ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
|
-
[32mESM[39m [1mdist/index.js [22m[32m18.
|
|
21
|
-
[32mESM[39m ⚡️ Build success in
|
|
22
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m18.
|
|
23
|
-
[32mCJS[39m ⚡️ Build success in
|
|
20
|
+
[32mESM[39m [1mdist/index.js [22m[32m18.79 KB[39m
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 851ms
|
|
22
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m18.84 KB[39m
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 859ms
|
package/CHANGELOG.md
CHANGED
|
@@ -221,6 +221,7 @@ export declare class OpenAIRealtimeVoice extends MastraVoice {
|
|
|
221
221
|
* ```
|
|
222
222
|
*/
|
|
223
223
|
connect(): Promise<void>;
|
|
224
|
+
disconnect(): void;
|
|
224
225
|
/**
|
|
225
226
|
* Streams audio data in real-time to the OpenAI service.
|
|
226
227
|
* Useful for continuous audio streaming scenarios like live microphone input.
|
|
@@ -221,6 +221,7 @@ export declare class OpenAIRealtimeVoice extends MastraVoice {
|
|
|
221
221
|
* ```
|
|
222
222
|
*/
|
|
223
223
|
connect(): Promise<void>;
|
|
224
|
+
disconnect(): void;
|
|
224
225
|
/**
|
|
225
226
|
* Streams audio data in real-time to the OpenAI service.
|
|
226
227
|
* Useful for continuous audio streaming scenarios like live microphone input.
|
package/dist/index.cjs
CHANGED
|
@@ -322,8 +322,7 @@ var OpenAIRealtimeVoice = class extends voice.MastraVoice {
|
|
|
322
322
|
}
|
|
323
323
|
});
|
|
324
324
|
this.setupEventListeners();
|
|
325
|
-
await this.waitForOpen();
|
|
326
|
-
await this.waitForSessionCreated();
|
|
325
|
+
await Promise.all([this.waitForOpen(), this.waitForSessionCreated()]);
|
|
327
326
|
const openaiTools = transformTools(this.tools);
|
|
328
327
|
this.updateConfig({
|
|
329
328
|
instructions: this.instructions,
|
|
@@ -335,6 +334,10 @@ var OpenAIRealtimeVoice = class extends voice.MastraVoice {
|
|
|
335
334
|
});
|
|
336
335
|
this.state = "open";
|
|
337
336
|
}
|
|
337
|
+
disconnect() {
|
|
338
|
+
this.state = "close";
|
|
339
|
+
this.ws?.close();
|
|
340
|
+
}
|
|
338
341
|
/**
|
|
339
342
|
* Streams audio data in real-time to the OpenAI service.
|
|
340
343
|
* Useful for continuous audio streaming scenarios like live microphone input.
|
package/dist/index.js
CHANGED
|
@@ -320,8 +320,7 @@ var OpenAIRealtimeVoice = class extends MastraVoice {
|
|
|
320
320
|
}
|
|
321
321
|
});
|
|
322
322
|
this.setupEventListeners();
|
|
323
|
-
await this.waitForOpen();
|
|
324
|
-
await this.waitForSessionCreated();
|
|
323
|
+
await Promise.all([this.waitForOpen(), this.waitForSessionCreated()]);
|
|
325
324
|
const openaiTools = transformTools(this.tools);
|
|
326
325
|
this.updateConfig({
|
|
327
326
|
instructions: this.instructions,
|
|
@@ -333,6 +332,10 @@ var OpenAIRealtimeVoice = class extends MastraVoice {
|
|
|
333
332
|
});
|
|
334
333
|
this.state = "open";
|
|
335
334
|
}
|
|
335
|
+
disconnect() {
|
|
336
|
+
this.state = "close";
|
|
337
|
+
this.ws?.close();
|
|
338
|
+
}
|
|
336
339
|
/**
|
|
337
340
|
* Streams audio data in real-time to the OpenAI service.
|
|
338
341
|
* Useful for continuous audio streaming scenarios like live microphone input.
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -378,8 +378,7 @@ export class OpenAIRealtimeVoice extends MastraVoice {
|
|
|
378
378
|
});
|
|
379
379
|
|
|
380
380
|
this.setupEventListeners();
|
|
381
|
-
await this.waitForOpen();
|
|
382
|
-
await this.waitForSessionCreated();
|
|
381
|
+
await Promise.all([this.waitForOpen(), this.waitForSessionCreated()]);
|
|
383
382
|
|
|
384
383
|
const openaiTools = transformTools(this.tools);
|
|
385
384
|
this.updateConfig({
|
|
@@ -393,6 +392,11 @@ export class OpenAIRealtimeVoice extends MastraVoice {
|
|
|
393
392
|
this.state = 'open';
|
|
394
393
|
}
|
|
395
394
|
|
|
395
|
+
disconnect() {
|
|
396
|
+
this.state = 'close';
|
|
397
|
+
this.ws?.close();
|
|
398
|
+
}
|
|
399
|
+
|
|
396
400
|
/**
|
|
397
401
|
* Streams audio data in real-time to the OpenAI service.
|
|
398
402
|
* Useful for continuous audio streaming scenarios like live microphone input.
|