@mastra/voice-openai 0.1.0
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 +18 -0
- package/CHANGELOG.md +18 -0
- package/LICENSE +44 -0
- package/README.md +91 -0
- package/__fixtures__/voice-test.m4a +0 -0
- package/dist/_tsup-dts-rollup.d.ts +83 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +151 -0
- package/eslint.config.js +6 -0
- package/package.json +37 -0
- package/src/index.test.ts +191 -0
- package/src/index.ts +204 -0
- package/test-outputs/speech-stream-input.mp3 +0 -0
- package/test-outputs/speech-test-params.mp3 +0 -0
- package/test-outputs/speech-test.mp3 +0 -0
- package/tsconfig.json +5 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
> @mastra/voice-openai@0.1.0 build /home/runner/work/mastra/mastra/voice/openai
|
|
3
|
+
> tsup src/index.ts --format esm --experimental-dts --clean --treeshake
|
|
4
|
+
|
|
5
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.3.6
|
|
8
|
+
[34mTSC[39m Build start
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 6281ms
|
|
10
|
+
[34mDTS[39m Build start
|
|
11
|
+
[34mCLI[39m Target: es2022
|
|
12
|
+
Analysis will use the bundled TypeScript version 5.7.3
|
|
13
|
+
[36mWriting package typings: /home/runner/work/mastra/mastra/voice/openai/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
|
+
[32mDTS[39m ⚡️ Build success in 5770ms
|
|
15
|
+
[34mCLI[39m Cleaning output folder
|
|
16
|
+
[34mESM[39m Build start
|
|
17
|
+
[32mESM[39m [1mdist/index.js [22m[32m5.80 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 384ms
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @mastra/voice-openai
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0821d6b: Deprecate @mastra/speech-openai for @mastra/voice-openai
|
|
8
|
+
- Updated dependencies [ce44b9b]
|
|
9
|
+
- Updated dependencies [967da43]
|
|
10
|
+
- Updated dependencies [b405f08]
|
|
11
|
+
- @mastra/core@0.4.1
|
|
12
|
+
|
|
13
|
+
## 0.1.0
|
|
14
|
+
|
|
15
|
+
### Changes
|
|
16
|
+
|
|
17
|
+
- `@mastra/speech-openai` is now deprecated. Please use `@mastra/voice-openai` instead.
|
|
18
|
+
- This package provides both Text-to-Speech (TTS) and Speech-to-Text (STT) capabilities through OpenAI's API.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Elastic License 2.0 (ELv2)
|
|
2
|
+
|
|
3
|
+
**Acceptance**
|
|
4
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
5
|
+
|
|
6
|
+
**Copyright License**
|
|
7
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
|
|
8
|
+
|
|
9
|
+
**Limitations**
|
|
10
|
+
You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
|
|
11
|
+
|
|
12
|
+
You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
|
|
13
|
+
|
|
14
|
+
You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
|
|
15
|
+
|
|
16
|
+
**Patents**
|
|
17
|
+
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
18
|
+
|
|
19
|
+
**Notices**
|
|
20
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
|
|
21
|
+
|
|
22
|
+
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
|
|
23
|
+
|
|
24
|
+
**No Other Rights**
|
|
25
|
+
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
26
|
+
|
|
27
|
+
**Termination**
|
|
28
|
+
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
|
|
29
|
+
|
|
30
|
+
**No Liability**
|
|
31
|
+
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
|
|
32
|
+
|
|
33
|
+
**Definitions**
|
|
34
|
+
The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
|
|
35
|
+
|
|
36
|
+
_you_ refers to the individual or entity agreeing to these terms.
|
|
37
|
+
|
|
38
|
+
_your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
39
|
+
|
|
40
|
+
_your licenses_ are all the licenses granted to you for the software under these terms.
|
|
41
|
+
|
|
42
|
+
_use_ means anything you do with the software requiring one of your licenses.
|
|
43
|
+
|
|
44
|
+
_trademark_ means trademarks, service marks, and similar rights.
|
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# @mastra/voice-openai
|
|
2
|
+
|
|
3
|
+
OpenAI Voice integration for Mastra, providing both Text-to-Speech (TTS) and Speech-to-Text (STT) capabilities using OpenAI's advanced models.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mastra/voice-openai
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Configuration
|
|
12
|
+
|
|
13
|
+
The module requires an OpenAI API key, which can be provided through environment variables or directly in the configuration:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
OPENAI_API_KEY=your_api_key
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { OpenAIVoice } from '@mastra/voice-openai';
|
|
23
|
+
|
|
24
|
+
// Create voice with both speech and listening capabilities
|
|
25
|
+
const voice = new OpenAIVoice({
|
|
26
|
+
speechModel: {
|
|
27
|
+
name: 'tts-1', // or 'tts-1-hd' for higher quality
|
|
28
|
+
apiKey: 'your-api-key', // Optional, can use OPENAI_API_KEY env var
|
|
29
|
+
},
|
|
30
|
+
listeningModel: {
|
|
31
|
+
name: 'whisper-1',
|
|
32
|
+
apiKey: 'your-api-key', // Optional, can use OPENAI_API_KEY env var
|
|
33
|
+
},
|
|
34
|
+
speaker: 'alloy', // Default voice
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// Or create speech-only voice
|
|
38
|
+
const speechVoice = new OpenAIVoice({
|
|
39
|
+
speechModel: {
|
|
40
|
+
name: 'tts-1',
|
|
41
|
+
apiKey: 'your-api-key',
|
|
42
|
+
},
|
|
43
|
+
speaker: 'nova',
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// Or create listening-only voice
|
|
47
|
+
const listeningVoice = new OpenAIVoice({
|
|
48
|
+
listeningModel: {
|
|
49
|
+
name: 'whisper-1',
|
|
50
|
+
apiKey: 'your-api-key',
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// List available voices
|
|
55
|
+
const speakers = await voice.getSpeakers();
|
|
56
|
+
|
|
57
|
+
// Generate speech
|
|
58
|
+
const audioStream = await voice.speak('Hello from Mastra!', {
|
|
59
|
+
speaker: 'nova', // Optional: override default speaker
|
|
60
|
+
speed: 1.0, // Optional: adjust speech speed
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Convert speech to text
|
|
64
|
+
const text = await voice.listen(audioStream, {
|
|
65
|
+
filetype: 'wav',
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Features
|
|
70
|
+
|
|
71
|
+
- High-quality Text-to-Speech synthesis
|
|
72
|
+
- Accurate Speech-to-Text transcription
|
|
73
|
+
- Multiple voice options
|
|
74
|
+
- Natural and expressive speech output
|
|
75
|
+
- Fast processing times
|
|
76
|
+
|
|
77
|
+
## Voice Options
|
|
78
|
+
|
|
79
|
+
OpenAI provides several high-quality voices:
|
|
80
|
+
|
|
81
|
+
- alloy (Neutral)
|
|
82
|
+
- echo (Male)
|
|
83
|
+
- fable (Male)
|
|
84
|
+
- onyx (Male)
|
|
85
|
+
- nova (Female)
|
|
86
|
+
- shimmer (Female)
|
|
87
|
+
- ash (Male)
|
|
88
|
+
- coral (Female)
|
|
89
|
+
- sage (Male)
|
|
90
|
+
|
|
91
|
+
View the complete list in OpenAI's [Text to Speech documentation](https://platform.openai.com/docs/guides/text-to-speech).
|
|
Binary file
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { MastraVoice } from '@mastra/core/voice';
|
|
2
|
+
import OpenAI from 'openai';
|
|
3
|
+
|
|
4
|
+
export declare interface OpenAIConfig {
|
|
5
|
+
name?: OpenAIModel;
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare type OpenAIModel = 'tts-1' | 'tts-1-hd' | 'whisper-1';
|
|
10
|
+
|
|
11
|
+
export declare class OpenAIVoice extends MastraVoice {
|
|
12
|
+
speechClient?: OpenAI;
|
|
13
|
+
listeningClient?: OpenAI;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs an instance of OpenAIVoice with optional configurations for speech and listening models.
|
|
16
|
+
*
|
|
17
|
+
* @param {Object} [config] - Configuration options for the OpenAIVoice instance.
|
|
18
|
+
* @param {OpenAIConfig} [config.listeningModel] - Configuration for the listening model, including model name and API key.
|
|
19
|
+
* @param {OpenAIConfig} [config.speechModel] - Configuration for the speech model, including model name and API key.
|
|
20
|
+
* @param {string} [config.speaker] - The default speaker's voice to use for speech synthesis.
|
|
21
|
+
* @throws {Error} - Throws an error if no API key is provided for either the speech or listening model.
|
|
22
|
+
*/
|
|
23
|
+
constructor({ listeningModel, speechModel, speaker, }?: {
|
|
24
|
+
listeningModel?: OpenAIConfig;
|
|
25
|
+
speechModel?: OpenAIConfig;
|
|
26
|
+
speaker?: string;
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves a list of available speakers for the speech model.
|
|
30
|
+
*
|
|
31
|
+
* @returns {Promise<Array<{ voiceId: OpenAIVoiceId }>>} - A promise that resolves to an array of objects,
|
|
32
|
+
* each containing a `voiceId` representing an available speaker.
|
|
33
|
+
* @throws {Error} - Throws an error if the speech model is not configured.
|
|
34
|
+
*/
|
|
35
|
+
getSpeakers(): Promise<Array<{
|
|
36
|
+
voiceId: OpenAIVoiceId;
|
|
37
|
+
}>>;
|
|
38
|
+
/**
|
|
39
|
+
* Converts text or audio input into speech using the configured speech model.
|
|
40
|
+
*
|
|
41
|
+
* @param {string | NodeJS.ReadableStream} input - The text or audio stream to be converted into speech.
|
|
42
|
+
* @param {Object} [options] - Optional parameters for the speech synthesis.
|
|
43
|
+
* @param {string} [options.speaker] - The speaker's voice to use for the speech synthesis.
|
|
44
|
+
* @param {number} [options.speed] - The speed at which the speech should be synthesized.
|
|
45
|
+
* @returns {Promise<NodeJS.ReadableStream>} - A promise that resolves to a readable stream of the synthesized audio.
|
|
46
|
+
* @throws {Error} - Throws an error if the speech model is not configured or if the input text is empty.
|
|
47
|
+
*/
|
|
48
|
+
speak(input: string | NodeJS.ReadableStream, options?: {
|
|
49
|
+
speaker?: string;
|
|
50
|
+
speed?: number;
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
}): Promise<NodeJS.ReadableStream>;
|
|
53
|
+
/**
|
|
54
|
+
* Transcribes audio from a given stream using the configured listening model.
|
|
55
|
+
*
|
|
56
|
+
* @param {NodeJS.ReadableStream} audioStream - The audio stream to be transcribed.
|
|
57
|
+
* @param {Object} [options] - Optional parameters for the transcription.
|
|
58
|
+
* @param {string} [options.filetype] - The file type of the audio stream.
|
|
59
|
+
* Supported types include 'mp3', 'mp4', 'mpeg', 'mpga', 'm4a', 'wav', 'webm'.
|
|
60
|
+
* @returns {Promise<string>} - A promise that resolves to the transcribed text.
|
|
61
|
+
* @throws {Error} - Throws an error if the listening model is not configured.
|
|
62
|
+
*/
|
|
63
|
+
listen(audioStream: NodeJS.ReadableStream, options?: {
|
|
64
|
+
filetype?: 'mp3' | 'mp4' | 'mpeg' | 'mpga' | 'm4a' | 'wav' | 'webm';
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
}): Promise<string>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export declare interface OpenAIVoiceConfig {
|
|
70
|
+
speech?: {
|
|
71
|
+
model: 'tts-1' | 'tts-1-hd';
|
|
72
|
+
apiKey?: string;
|
|
73
|
+
speaker?: OpenAIVoiceId;
|
|
74
|
+
};
|
|
75
|
+
listening?: {
|
|
76
|
+
model: 'whisper-1';
|
|
77
|
+
apiKey?: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare type OpenAIVoiceId = 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer' | 'ash' | 'coral' | 'sage';
|
|
82
|
+
|
|
83
|
+
export { }
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { MastraVoice } from '@mastra/core/voice';
|
|
2
|
+
import OpenAI from 'openai';
|
|
3
|
+
import { PassThrough } from 'stream';
|
|
4
|
+
|
|
5
|
+
// src/index.ts
|
|
6
|
+
var OpenAIVoice = class extends MastraVoice {
|
|
7
|
+
speechClient;
|
|
8
|
+
listeningClient;
|
|
9
|
+
/**
|
|
10
|
+
* Constructs an instance of OpenAIVoice with optional configurations for speech and listening models.
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} [config] - Configuration options for the OpenAIVoice instance.
|
|
13
|
+
* @param {OpenAIConfig} [config.listeningModel] - Configuration for the listening model, including model name and API key.
|
|
14
|
+
* @param {OpenAIConfig} [config.speechModel] - Configuration for the speech model, including model name and API key.
|
|
15
|
+
* @param {string} [config.speaker] - The default speaker's voice to use for speech synthesis.
|
|
16
|
+
* @throws {Error} - Throws an error if no API key is provided for either the speech or listening model.
|
|
17
|
+
*/
|
|
18
|
+
constructor({
|
|
19
|
+
listeningModel,
|
|
20
|
+
speechModel,
|
|
21
|
+
speaker
|
|
22
|
+
} = {}) {
|
|
23
|
+
const defaultApiKey = process.env.OPENAI_API_KEY;
|
|
24
|
+
const defaultSpeechModel = {
|
|
25
|
+
name: "tts-1",
|
|
26
|
+
apiKey: defaultApiKey
|
|
27
|
+
};
|
|
28
|
+
const defaultListeningModel = {
|
|
29
|
+
name: "whisper-1",
|
|
30
|
+
apiKey: defaultApiKey
|
|
31
|
+
};
|
|
32
|
+
super({
|
|
33
|
+
speechModel: {
|
|
34
|
+
name: speechModel?.name ?? defaultSpeechModel.name,
|
|
35
|
+
apiKey: speechModel?.apiKey ?? defaultSpeechModel.apiKey
|
|
36
|
+
},
|
|
37
|
+
listeningModel: {
|
|
38
|
+
name: listeningModel?.name ?? defaultListeningModel.name,
|
|
39
|
+
apiKey: listeningModel?.apiKey ?? defaultListeningModel.apiKey
|
|
40
|
+
},
|
|
41
|
+
speaker: speaker ?? "alloy"
|
|
42
|
+
});
|
|
43
|
+
const speechApiKey = speechModel?.apiKey || defaultApiKey;
|
|
44
|
+
if (!speechApiKey) {
|
|
45
|
+
throw new Error("No API key provided for speech model");
|
|
46
|
+
}
|
|
47
|
+
this.speechClient = new OpenAI({ apiKey: speechApiKey });
|
|
48
|
+
const listeningApiKey = listeningModel?.apiKey || defaultApiKey;
|
|
49
|
+
if (!listeningApiKey) {
|
|
50
|
+
throw new Error("No API key provided for listening model");
|
|
51
|
+
}
|
|
52
|
+
this.listeningClient = new OpenAI({ apiKey: listeningApiKey });
|
|
53
|
+
if (!this.speechClient && !this.listeningClient) {
|
|
54
|
+
throw new Error("At least one of OPENAI_API_KEY, speechModel.apiKey, or listeningModel.apiKey must be set");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Retrieves a list of available speakers for the speech model.
|
|
59
|
+
*
|
|
60
|
+
* @returns {Promise<Array<{ voiceId: OpenAIVoiceId }>>} - A promise that resolves to an array of objects,
|
|
61
|
+
* each containing a `voiceId` representing an available speaker.
|
|
62
|
+
* @throws {Error} - Throws an error if the speech model is not configured.
|
|
63
|
+
*/
|
|
64
|
+
async getSpeakers() {
|
|
65
|
+
if (!this.speechModel) {
|
|
66
|
+
throw new Error("Speech model not configured");
|
|
67
|
+
}
|
|
68
|
+
return [
|
|
69
|
+
{ voiceId: "alloy" },
|
|
70
|
+
{ voiceId: "echo" },
|
|
71
|
+
{ voiceId: "fable" },
|
|
72
|
+
{ voiceId: "onyx" },
|
|
73
|
+
{ voiceId: "nova" },
|
|
74
|
+
{ voiceId: "shimmer" },
|
|
75
|
+
{ voiceId: "ash" },
|
|
76
|
+
{ voiceId: "coral" },
|
|
77
|
+
{ voiceId: "sage" }
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Converts text or audio input into speech using the configured speech model.
|
|
82
|
+
*
|
|
83
|
+
* @param {string | NodeJS.ReadableStream} input - The text or audio stream to be converted into speech.
|
|
84
|
+
* @param {Object} [options] - Optional parameters for the speech synthesis.
|
|
85
|
+
* @param {string} [options.speaker] - The speaker's voice to use for the speech synthesis.
|
|
86
|
+
* @param {number} [options.speed] - The speed at which the speech should be synthesized.
|
|
87
|
+
* @returns {Promise<NodeJS.ReadableStream>} - A promise that resolves to a readable stream of the synthesized audio.
|
|
88
|
+
* @throws {Error} - Throws an error if the speech model is not configured or if the input text is empty.
|
|
89
|
+
*/
|
|
90
|
+
async speak(input, options) {
|
|
91
|
+
if (!this.speechClient) {
|
|
92
|
+
throw new Error("Speech model not configured");
|
|
93
|
+
}
|
|
94
|
+
if (typeof input !== "string") {
|
|
95
|
+
const chunks = [];
|
|
96
|
+
for await (const chunk of input) {
|
|
97
|
+
chunks.push(Buffer.from(chunk));
|
|
98
|
+
}
|
|
99
|
+
input = Buffer.concat(chunks).toString("utf-8");
|
|
100
|
+
}
|
|
101
|
+
if (input.trim().length === 0) {
|
|
102
|
+
throw new Error("Input text is empty");
|
|
103
|
+
}
|
|
104
|
+
const audio = await this.traced(async () => {
|
|
105
|
+
const response = await this.speechClient.audio.speech.create({
|
|
106
|
+
model: this.speechModel?.name ?? "tts-1",
|
|
107
|
+
voice: options?.speaker ?? this.speaker,
|
|
108
|
+
input,
|
|
109
|
+
speed: options?.speed || 1
|
|
110
|
+
});
|
|
111
|
+
const passThrough = new PassThrough();
|
|
112
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
113
|
+
passThrough.end(buffer);
|
|
114
|
+
return passThrough;
|
|
115
|
+
}, "voice.openai.speak")();
|
|
116
|
+
return audio;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Transcribes audio from a given stream using the configured listening model.
|
|
120
|
+
*
|
|
121
|
+
* @param {NodeJS.ReadableStream} audioStream - The audio stream to be transcribed.
|
|
122
|
+
* @param {Object} [options] - Optional parameters for the transcription.
|
|
123
|
+
* @param {string} [options.filetype] - The file type of the audio stream.
|
|
124
|
+
* Supported types include 'mp3', 'mp4', 'mpeg', 'mpga', 'm4a', 'wav', 'webm'.
|
|
125
|
+
* @returns {Promise<string>} - A promise that resolves to the transcribed text.
|
|
126
|
+
* @throws {Error} - Throws an error if the listening model is not configured.
|
|
127
|
+
*/
|
|
128
|
+
async listen(audioStream, options) {
|
|
129
|
+
if (!this.listeningClient) {
|
|
130
|
+
throw new Error("Listening model not configured");
|
|
131
|
+
}
|
|
132
|
+
const chunks = [];
|
|
133
|
+
for await (const chunk of audioStream) {
|
|
134
|
+
chunks.push(Buffer.from(chunk));
|
|
135
|
+
}
|
|
136
|
+
const audioBuffer = Buffer.concat(chunks);
|
|
137
|
+
const text = await this.traced(async () => {
|
|
138
|
+
const { filetype, ...otherOptions } = options || {};
|
|
139
|
+
const file = new File([audioBuffer], `audio.${filetype || "mp3"}`);
|
|
140
|
+
const response = await this.listeningClient.audio.transcriptions.create({
|
|
141
|
+
model: this.listeningModel?.name || "whisper-1",
|
|
142
|
+
file,
|
|
143
|
+
...otherOptions
|
|
144
|
+
});
|
|
145
|
+
return response.text;
|
|
146
|
+
}, "voice.openai.listen")();
|
|
147
|
+
return text;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export { OpenAIVoice };
|
package/eslint.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mastra/voice-openai",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Mastra OpenAI speech integration",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"openai": "^4.28.0",
|
|
19
|
+
"zod": "^3.24.1",
|
|
20
|
+
"@mastra/core": "^0.4.1"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@microsoft/api-extractor": "^7.49.2",
|
|
24
|
+
"@types/node": "^22.13.1",
|
|
25
|
+
"tsup": "^8.3.6",
|
|
26
|
+
"typescript": "^5.7.3",
|
|
27
|
+
"vitest": "^2.1.8",
|
|
28
|
+
"eslint": "^9.20.1",
|
|
29
|
+
"@internal/lint": "0.0.0"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsup src/index.ts --format esm --experimental-dts --clean --treeshake",
|
|
33
|
+
"build:watch": "pnpm build --watch",
|
|
34
|
+
"test": "vitest run",
|
|
35
|
+
"lint": "eslint ."
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { writeFileSync, mkdirSync, createReadStream } from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { PassThrough } from 'stream';
|
|
4
|
+
import { describe, expect, it, beforeAll } from 'vitest';
|
|
5
|
+
|
|
6
|
+
import { OpenAIVoice } from './index.js';
|
|
7
|
+
|
|
8
|
+
describe('OpenAIVoice Integration Tests', () => {
|
|
9
|
+
let voice: OpenAIVoice;
|
|
10
|
+
const outputDir = path.join(process.cwd(), 'test-outputs');
|
|
11
|
+
|
|
12
|
+
beforeAll(() => {
|
|
13
|
+
try {
|
|
14
|
+
mkdirSync(outputDir, { recursive: true });
|
|
15
|
+
} catch (err) {
|
|
16
|
+
// Ignore if directory already exists
|
|
17
|
+
console.log('Directory already exists: ', err);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
voice = new OpenAIVoice({
|
|
21
|
+
speechModel: {
|
|
22
|
+
name: 'tts-1',
|
|
23
|
+
},
|
|
24
|
+
listeningModel: {
|
|
25
|
+
name: 'whisper-1',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
describe('getSpeakers', () => {
|
|
31
|
+
it('should list available voices', async () => {
|
|
32
|
+
const speakers = await voice.getSpeakers();
|
|
33
|
+
expect(speakers).toContainEqual({ voiceId: 'alloy' });
|
|
34
|
+
expect(speakers).toContainEqual({ voiceId: 'nova' });
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('should initialize with default parameters', async () => {
|
|
39
|
+
const defaultVoice = new OpenAIVoice();
|
|
40
|
+
const speakers = await defaultVoice.getSpeakers();
|
|
41
|
+
expect(speakers).toBeInstanceOf(Array);
|
|
42
|
+
expect(speakers.length).toBeGreaterThan(0);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
describe('speak', () => {
|
|
46
|
+
it('should speak with default parameters', async () => {
|
|
47
|
+
const defaultVoice = new OpenAIVoice();
|
|
48
|
+
const audioStream = await defaultVoice.speak('Hello with defaults');
|
|
49
|
+
|
|
50
|
+
const chunks: Buffer[] = [];
|
|
51
|
+
for await (const chunk of audioStream) {
|
|
52
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
53
|
+
}
|
|
54
|
+
const audioBuffer = Buffer.concat(chunks);
|
|
55
|
+
|
|
56
|
+
expect(audioBuffer.length).toBeGreaterThan(0);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('should generate audio stream from text', async () => {
|
|
60
|
+
const audioStream = await voice.speak('Hello World', {
|
|
61
|
+
speaker: 'alloy',
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const chunks: Buffer[] = [];
|
|
65
|
+
for await (const chunk of audioStream) {
|
|
66
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
67
|
+
}
|
|
68
|
+
const audioBuffer = Buffer.concat(chunks);
|
|
69
|
+
|
|
70
|
+
expect(audioBuffer.length).toBeGreaterThan(0);
|
|
71
|
+
|
|
72
|
+
const outputPath = path.join(outputDir, 'speech-test.mp3');
|
|
73
|
+
writeFileSync(outputPath, audioBuffer);
|
|
74
|
+
}, 10000);
|
|
75
|
+
|
|
76
|
+
it('should work with different parameters', async () => {
|
|
77
|
+
const audioStream = await voice.speak('Test with parameters', {
|
|
78
|
+
speaker: 'nova',
|
|
79
|
+
speed: 0.5,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const chunks: Buffer[] = [];
|
|
83
|
+
for await (const chunk of audioStream) {
|
|
84
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
85
|
+
}
|
|
86
|
+
const audioBuffer = Buffer.concat(chunks);
|
|
87
|
+
|
|
88
|
+
expect(audioBuffer.length).toBeGreaterThan(0);
|
|
89
|
+
|
|
90
|
+
const outputPath = path.join(outputDir, 'speech-test-params.mp3');
|
|
91
|
+
writeFileSync(outputPath, audioBuffer);
|
|
92
|
+
}, 10000);
|
|
93
|
+
|
|
94
|
+
it('should accept text stream as input', async () => {
|
|
95
|
+
const inputStream = new PassThrough();
|
|
96
|
+
inputStream.end('Hello from stream');
|
|
97
|
+
|
|
98
|
+
const audioStream = await voice.speak(inputStream, {
|
|
99
|
+
speaker: 'alloy',
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const chunks: Buffer[] = [];
|
|
103
|
+
for await (const chunk of audioStream) {
|
|
104
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
105
|
+
}
|
|
106
|
+
const audioBuffer = Buffer.concat(chunks);
|
|
107
|
+
|
|
108
|
+
expect(audioBuffer.length).toBeGreaterThan(0);
|
|
109
|
+
|
|
110
|
+
const outputPath = path.join(outputDir, 'speech-stream-input.mp3');
|
|
111
|
+
writeFileSync(outputPath, audioBuffer);
|
|
112
|
+
}, 10000);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
describe('listen', () => {
|
|
116
|
+
it('should listen with default parameters', async () => {
|
|
117
|
+
const defaultVoice = new OpenAIVoice();
|
|
118
|
+
const audioStream = await defaultVoice.speak('Listening test with defaults');
|
|
119
|
+
|
|
120
|
+
const text = await defaultVoice.listen(audioStream);
|
|
121
|
+
|
|
122
|
+
expect(text).toBeTruthy();
|
|
123
|
+
expect(typeof text).toBe('string');
|
|
124
|
+
expect(text.toLowerCase()).toContain('listening test');
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it('should transcribe audio from fixture file', async () => {
|
|
128
|
+
const fixturePath = path.join(process.cwd(), '__fixtures__', 'voice-test.m4a');
|
|
129
|
+
const audioStream = createReadStream(fixturePath);
|
|
130
|
+
|
|
131
|
+
const text = await voice.listen(audioStream, {
|
|
132
|
+
filetype: 'm4a',
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
expect(text).toBeTruthy();
|
|
136
|
+
console.log(text);
|
|
137
|
+
expect(typeof text).toBe('string');
|
|
138
|
+
expect(text.length).toBeGreaterThan(0);
|
|
139
|
+
}, 15000);
|
|
140
|
+
|
|
141
|
+
it('should transcribe audio stream', async () => {
|
|
142
|
+
// First generate some test audio
|
|
143
|
+
const audioStream = await voice.speak('This is a test for transcription', {
|
|
144
|
+
speaker: 'alloy',
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// Then transcribe it
|
|
148
|
+
const text = await voice.listen(audioStream, {
|
|
149
|
+
filetype: 'm4a',
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
expect(text).toBeTruthy();
|
|
153
|
+
expect(typeof text).toBe('string');
|
|
154
|
+
expect(text.toLowerCase()).toContain('test');
|
|
155
|
+
}, 15000);
|
|
156
|
+
|
|
157
|
+
it('should accept options', async () => {
|
|
158
|
+
const audioStream = await voice.speak('Test with language option', {
|
|
159
|
+
speaker: 'nova',
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
const text = await voice.listen(audioStream, {
|
|
163
|
+
language: 'en',
|
|
164
|
+
filetype: 'm4a',
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
expect(text).toBeTruthy();
|
|
168
|
+
expect(typeof text).toBe('string');
|
|
169
|
+
expect(text.toLowerCase()).toContain('test');
|
|
170
|
+
}, 15000);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// Error cases
|
|
174
|
+
describe('error handling', () => {
|
|
175
|
+
it('should handle invalid speaker names', async () => {
|
|
176
|
+
await expect(
|
|
177
|
+
voice.speak('Test', {
|
|
178
|
+
speaker: 'invalid_voice',
|
|
179
|
+
}),
|
|
180
|
+
).rejects.toThrow();
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it('should handle empty text', async () => {
|
|
184
|
+
await expect(
|
|
185
|
+
voice.speak('', {
|
|
186
|
+
speaker: 'alloy',
|
|
187
|
+
}),
|
|
188
|
+
).rejects.toThrow();
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
});
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { MastraVoice } from '@mastra/core/voice';
|
|
2
|
+
import OpenAI from 'openai';
|
|
3
|
+
import { PassThrough } from 'stream';
|
|
4
|
+
|
|
5
|
+
type OpenAIVoiceId = 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer' | 'ash' | 'coral' | 'sage';
|
|
6
|
+
type OpenAIModel = 'tts-1' | 'tts-1-hd' | 'whisper-1';
|
|
7
|
+
|
|
8
|
+
export interface OpenAIConfig {
|
|
9
|
+
name?: OpenAIModel;
|
|
10
|
+
apiKey?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface OpenAIVoiceConfig {
|
|
14
|
+
speech?: {
|
|
15
|
+
model: 'tts-1' | 'tts-1-hd';
|
|
16
|
+
apiKey?: string;
|
|
17
|
+
speaker?: OpenAIVoiceId;
|
|
18
|
+
};
|
|
19
|
+
listening?: {
|
|
20
|
+
model: 'whisper-1';
|
|
21
|
+
apiKey?: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class OpenAIVoice extends MastraVoice {
|
|
26
|
+
speechClient?: OpenAI;
|
|
27
|
+
listeningClient?: OpenAI;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Constructs an instance of OpenAIVoice with optional configurations for speech and listening models.
|
|
31
|
+
*
|
|
32
|
+
* @param {Object} [config] - Configuration options for the OpenAIVoice instance.
|
|
33
|
+
* @param {OpenAIConfig} [config.listeningModel] - Configuration for the listening model, including model name and API key.
|
|
34
|
+
* @param {OpenAIConfig} [config.speechModel] - Configuration for the speech model, including model name and API key.
|
|
35
|
+
* @param {string} [config.speaker] - The default speaker's voice to use for speech synthesis.
|
|
36
|
+
* @throws {Error} - Throws an error if no API key is provided for either the speech or listening model.
|
|
37
|
+
*/
|
|
38
|
+
constructor({
|
|
39
|
+
listeningModel,
|
|
40
|
+
speechModel,
|
|
41
|
+
speaker,
|
|
42
|
+
}: {
|
|
43
|
+
listeningModel?: OpenAIConfig;
|
|
44
|
+
speechModel?: OpenAIConfig;
|
|
45
|
+
speaker?: string;
|
|
46
|
+
} = {}) {
|
|
47
|
+
const defaultApiKey = process.env.OPENAI_API_KEY;
|
|
48
|
+
const defaultSpeechModel = {
|
|
49
|
+
name: 'tts-1',
|
|
50
|
+
apiKey: defaultApiKey,
|
|
51
|
+
};
|
|
52
|
+
const defaultListeningModel = {
|
|
53
|
+
name: 'whisper-1',
|
|
54
|
+
apiKey: defaultApiKey,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
super({
|
|
58
|
+
speechModel: {
|
|
59
|
+
name: speechModel?.name ?? defaultSpeechModel.name,
|
|
60
|
+
apiKey: speechModel?.apiKey ?? defaultSpeechModel.apiKey,
|
|
61
|
+
},
|
|
62
|
+
listeningModel: {
|
|
63
|
+
name: listeningModel?.name ?? defaultListeningModel.name,
|
|
64
|
+
apiKey: listeningModel?.apiKey ?? defaultListeningModel.apiKey,
|
|
65
|
+
},
|
|
66
|
+
speaker: speaker ?? 'alloy',
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const speechApiKey = speechModel?.apiKey || defaultApiKey;
|
|
70
|
+
if (!speechApiKey) {
|
|
71
|
+
throw new Error('No API key provided for speech model');
|
|
72
|
+
}
|
|
73
|
+
this.speechClient = new OpenAI({ apiKey: speechApiKey });
|
|
74
|
+
|
|
75
|
+
const listeningApiKey = listeningModel?.apiKey || defaultApiKey;
|
|
76
|
+
if (!listeningApiKey) {
|
|
77
|
+
throw new Error('No API key provided for listening model');
|
|
78
|
+
}
|
|
79
|
+
this.listeningClient = new OpenAI({ apiKey: listeningApiKey });
|
|
80
|
+
|
|
81
|
+
if (!this.speechClient && !this.listeningClient) {
|
|
82
|
+
throw new Error('At least one of OPENAI_API_KEY, speechModel.apiKey, or listeningModel.apiKey must be set');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Retrieves a list of available speakers for the speech model.
|
|
88
|
+
*
|
|
89
|
+
* @returns {Promise<Array<{ voiceId: OpenAIVoiceId }>>} - A promise that resolves to an array of objects,
|
|
90
|
+
* each containing a `voiceId` representing an available speaker.
|
|
91
|
+
* @throws {Error} - Throws an error if the speech model is not configured.
|
|
92
|
+
*/
|
|
93
|
+
async getSpeakers(): Promise<Array<{ voiceId: OpenAIVoiceId }>> {
|
|
94
|
+
if (!this.speechModel) {
|
|
95
|
+
throw new Error('Speech model not configured');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return [
|
|
99
|
+
{ voiceId: 'alloy' },
|
|
100
|
+
{ voiceId: 'echo' },
|
|
101
|
+
{ voiceId: 'fable' },
|
|
102
|
+
{ voiceId: 'onyx' },
|
|
103
|
+
{ voiceId: 'nova' },
|
|
104
|
+
{ voiceId: 'shimmer' },
|
|
105
|
+
{ voiceId: 'ash' },
|
|
106
|
+
{ voiceId: 'coral' },
|
|
107
|
+
{ voiceId: 'sage' },
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Converts text or audio input into speech using the configured speech model.
|
|
113
|
+
*
|
|
114
|
+
* @param {string | NodeJS.ReadableStream} input - The text or audio stream to be converted into speech.
|
|
115
|
+
* @param {Object} [options] - Optional parameters for the speech synthesis.
|
|
116
|
+
* @param {string} [options.speaker] - The speaker's voice to use for the speech synthesis.
|
|
117
|
+
* @param {number} [options.speed] - The speed at which the speech should be synthesized.
|
|
118
|
+
* @returns {Promise<NodeJS.ReadableStream>} - A promise that resolves to a readable stream of the synthesized audio.
|
|
119
|
+
* @throws {Error} - Throws an error if the speech model is not configured or if the input text is empty.
|
|
120
|
+
*/
|
|
121
|
+
async speak(
|
|
122
|
+
input: string | NodeJS.ReadableStream,
|
|
123
|
+
options?: {
|
|
124
|
+
speaker?: string;
|
|
125
|
+
speed?: number;
|
|
126
|
+
[key: string]: any;
|
|
127
|
+
},
|
|
128
|
+
): Promise<NodeJS.ReadableStream> {
|
|
129
|
+
if (!this.speechClient) {
|
|
130
|
+
throw new Error('Speech model not configured');
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (typeof input !== 'string') {
|
|
134
|
+
const chunks: Buffer[] = [];
|
|
135
|
+
for await (const chunk of input) {
|
|
136
|
+
chunks.push(Buffer.from(chunk));
|
|
137
|
+
}
|
|
138
|
+
input = Buffer.concat(chunks).toString('utf-8');
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (input.trim().length === 0) {
|
|
142
|
+
throw new Error('Input text is empty');
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const audio = await this.traced(async () => {
|
|
146
|
+
const response = await this.speechClient!.audio.speech.create({
|
|
147
|
+
model: this.speechModel?.name ?? 'tts-1',
|
|
148
|
+
voice: (options?.speaker ?? this.speaker) as OpenAIVoiceId,
|
|
149
|
+
input,
|
|
150
|
+
speed: options?.speed || 1.0,
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const passThrough = new PassThrough();
|
|
154
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
155
|
+
passThrough.end(buffer);
|
|
156
|
+
return passThrough;
|
|
157
|
+
}, 'voice.openai.speak')();
|
|
158
|
+
|
|
159
|
+
return audio;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Transcribes audio from a given stream using the configured listening model.
|
|
164
|
+
*
|
|
165
|
+
* @param {NodeJS.ReadableStream} audioStream - The audio stream to be transcribed.
|
|
166
|
+
* @param {Object} [options] - Optional parameters for the transcription.
|
|
167
|
+
* @param {string} [options.filetype] - The file type of the audio stream.
|
|
168
|
+
* Supported types include 'mp3', 'mp4', 'mpeg', 'mpga', 'm4a', 'wav', 'webm'.
|
|
169
|
+
* @returns {Promise<string>} - A promise that resolves to the transcribed text.
|
|
170
|
+
* @throws {Error} - Throws an error if the listening model is not configured.
|
|
171
|
+
*/
|
|
172
|
+
async listen(
|
|
173
|
+
audioStream: NodeJS.ReadableStream,
|
|
174
|
+
options?: {
|
|
175
|
+
filetype?: 'mp3' | 'mp4' | 'mpeg' | 'mpga' | 'm4a' | 'wav' | 'webm';
|
|
176
|
+
[key: string]: any;
|
|
177
|
+
},
|
|
178
|
+
): Promise<string> {
|
|
179
|
+
if (!this.listeningClient) {
|
|
180
|
+
throw new Error('Listening model not configured');
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const chunks: Buffer[] = [];
|
|
184
|
+
for await (const chunk of audioStream) {
|
|
185
|
+
chunks.push(Buffer.from(chunk));
|
|
186
|
+
}
|
|
187
|
+
const audioBuffer = Buffer.concat(chunks);
|
|
188
|
+
|
|
189
|
+
const text = await this.traced(async () => {
|
|
190
|
+
const { filetype, ...otherOptions } = options || {};
|
|
191
|
+
const file = new File([audioBuffer], `audio.${filetype || 'mp3'}`);
|
|
192
|
+
|
|
193
|
+
const response = await this.listeningClient!.audio.transcriptions.create({
|
|
194
|
+
model: this.listeningModel?.name || 'whisper-1',
|
|
195
|
+
file: file as any,
|
|
196
|
+
...otherOptions,
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
return response.text;
|
|
200
|
+
}, 'voice.openai.listen')();
|
|
201
|
+
|
|
202
|
+
return text;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/tsconfig.json
ADDED