@mastra/voice-playai 0.1.0 → 0.1.1-alpha.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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +19 -0
- package/dist/index.js +2 -2
- package/eslint.config.js +6 -0
- package/package.json +7 -4
- package/src/index.test.ts +2 -3
- package/src/index.ts +3 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/voice-playai@0.1.
|
|
2
|
+
> @mastra/voice-playai@0.1.1-alpha.1 build /home/runner/work/mastra/mastra/voice/playai
|
|
3
3
|
> tsup src/index.ts --format esm --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.3.6
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 6440ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.7.3
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/voice/playai/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
+
[32mDTS[39m ⚡️ Build success in 5288ms
|
|
15
15
|
[34mCLI[39m Cleaning output folder
|
|
16
16
|
[34mESM[39m Build start
|
|
17
17
|
[32mESM[39m [1mdist/index.js [22m[32m5.97 KB[39m
|
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 252ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @mastra/voice-playai
|
|
2
2
|
|
|
3
|
+
## 0.1.1-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0d185b1]
|
|
8
|
+
- Updated dependencies [ed55f1d]
|
|
9
|
+
- Updated dependencies [8d13b14]
|
|
10
|
+
- Updated dependencies [3ee4831]
|
|
11
|
+
- Updated dependencies [108793c]
|
|
12
|
+
- Updated dependencies [5f28f44]
|
|
13
|
+
- @mastra/core@0.4.3-alpha.1
|
|
14
|
+
|
|
15
|
+
## 0.1.1-alpha.0
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [06aa827]
|
|
20
|
+
- @mastra/core@0.4.3-alpha.0
|
|
21
|
+
|
|
3
22
|
## 0.1.0
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MastraVoice } from '@mastra/core/voice';
|
|
2
1
|
import { PassThrough } from 'stream';
|
|
2
|
+
import { MastraVoice } from '@mastra/core/voice';
|
|
3
3
|
|
|
4
4
|
// src/index.ts
|
|
5
5
|
var PLAYAI_VOICES = [
|
|
@@ -179,7 +179,7 @@ var PlayAIVoice = class extends MastraVoice {
|
|
|
179
179
|
}
|
|
180
180
|
const stream = new PassThrough();
|
|
181
181
|
const reader = response.body.getReader();
|
|
182
|
-
(async () => {
|
|
182
|
+
void (async () => {
|
|
183
183
|
try {
|
|
184
184
|
while (true) {
|
|
185
185
|
const { done, value } = await reader.read();
|
package/eslint.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/voice-playai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-alpha.1",
|
|
4
4
|
"description": "Mastra PlayAI voice integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,18 +16,21 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"zod": "^3.24.1",
|
|
19
|
-
"@mastra/core": "^0.4.
|
|
19
|
+
"@mastra/core": "^0.4.3-alpha.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
+
"eslint": "^9.20.1",
|
|
22
23
|
"@microsoft/api-extractor": "^7.49.2",
|
|
23
24
|
"@types/node": "^22.13.1",
|
|
24
25
|
"tsup": "^8.0.1",
|
|
25
26
|
"typescript": "^5.7.3",
|
|
26
|
-
"vitest": "^2.1.8"
|
|
27
|
+
"vitest": "^2.1.8",
|
|
28
|
+
"@internal/lint": "0.0.0"
|
|
27
29
|
},
|
|
28
30
|
"scripts": {
|
|
29
31
|
"build": "tsup src/index.ts --format esm --experimental-dts --clean --treeshake",
|
|
30
32
|
"build:watch": "pnpm build --watch",
|
|
31
|
-
"test": "vitest run"
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"lint": "eslint ."
|
|
32
35
|
}
|
|
33
36
|
}
|
package/src/index.test.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { createWriteStream, mkdirSync } from 'fs';
|
|
2
|
+
import { writeFile } from 'fs/promises';
|
|
2
3
|
import path from 'path';
|
|
3
4
|
import { Readable } from 'stream';
|
|
4
5
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
5
6
|
|
|
6
|
-
import { writeFile } from 'fs/promises';
|
|
7
|
-
|
|
8
7
|
import { PlayAIVoice, PLAYAI_VOICES } from './index.js';
|
|
9
8
|
|
|
10
9
|
describe('PlayAI Voice Integration Tests', () => {
|
|
@@ -22,7 +21,7 @@ describe('PlayAI Voice Integration Tests', () => {
|
|
|
22
21
|
// Create output directory if it doesn't exist
|
|
23
22
|
try {
|
|
24
23
|
mkdirSync(outputDir, { recursive: true });
|
|
25
|
-
} catch
|
|
24
|
+
} catch {
|
|
26
25
|
// Ignore if directory already exists
|
|
27
26
|
}
|
|
28
27
|
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { MastraVoice } from '@mastra/core/voice';
|
|
2
1
|
import { PassThrough } from 'stream';
|
|
3
2
|
|
|
3
|
+
import { MastraVoice } from '@mastra/core/voice';
|
|
4
|
+
|
|
4
5
|
interface PlayAIVoiceInfo {
|
|
5
6
|
name: string;
|
|
6
7
|
accent: string;
|
|
@@ -209,7 +210,7 @@ export class PlayAIVoice extends MastraVoice {
|
|
|
209
210
|
|
|
210
211
|
// Process the stream
|
|
211
212
|
const reader = response.body.getReader();
|
|
212
|
-
(async () => {
|
|
213
|
+
void (async () => {
|
|
213
214
|
try {
|
|
214
215
|
while (true) {
|
|
215
216
|
const { done, value } = await reader.read();
|