@moxxy/plugin-stt-whisper 0.41.3 → 0.42.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/package.json +5 -5
- package/src/whisper.test.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxxy/plugin-stt-whisper",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.1",
|
|
4
4
|
"description": "OpenAI Whisper Transcriber for moxxy. Audio bytes → text + segments. Plugs into the session's TranscriberRegistry; channels with audio input (Telegram voice, HTTP multipart) consume it transparently.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"moxxy",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"openai": "^
|
|
47
|
-
"@moxxy/sdk": "0.
|
|
46
|
+
"openai": "^7.27.0",
|
|
47
|
+
"@moxxy/sdk": "0.42.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@types/node": "^22.
|
|
50
|
+
"@types/node": "^22.20.5",
|
|
51
51
|
"typescript": "^6.0.3",
|
|
52
|
-
"vitest": "^
|
|
52
|
+
"vitest": "^5.0.3",
|
|
53
53
|
"@moxxy/tsconfig": "0.0.0",
|
|
54
54
|
"@moxxy/vitest-preset": "0.0.0"
|
|
55
55
|
},
|
package/src/whisper.test.ts
CHANGED
|
@@ -223,7 +223,7 @@ describe('WhisperTranscriber.run() error translation', () => {
|
|
|
223
223
|
});
|
|
224
224
|
|
|
225
225
|
it('maps HTTP 401 to AUTH_INVALID', async () => {
|
|
226
|
-
const err = new APIError(401, { error: { message: 'bad key' } }, 'Unauthorized',
|
|
226
|
+
const err = new APIError(401, { error: { message: 'bad key' } }, 'Unauthorized', new Headers());
|
|
227
227
|
const t = new WhisperTranscriber({ client: throwingOpenAI(err) });
|
|
228
228
|
await expect(t.transcribe(audio, { mimeType: 'audio/ogg' })).rejects.toMatchObject({
|
|
229
229
|
code: 'AUTH_INVALID',
|
|
@@ -231,7 +231,7 @@ describe('WhisperTranscriber.run() error translation', () => {
|
|
|
231
231
|
});
|
|
232
232
|
|
|
233
233
|
it('maps HTTP 500 to PROVIDER_SERVER_ERROR', async () => {
|
|
234
|
-
const err = new APIError(500, undefined, 'boom',
|
|
234
|
+
const err = new APIError(500, undefined, 'boom', new Headers());
|
|
235
235
|
const t = new WhisperTranscriber({ client: throwingOpenAI(err) });
|
|
236
236
|
await expect(t.transcribe(audio, { mimeType: 'audio/ogg' })).rejects.toMatchObject({
|
|
237
237
|
code: 'PROVIDER_SERVER_ERROR',
|
|
@@ -239,7 +239,7 @@ describe('WhisperTranscriber.run() error translation', () => {
|
|
|
239
239
|
});
|
|
240
240
|
|
|
241
241
|
it('falls back to PROVIDER_BAD_REQUEST for an unmapped status', async () => {
|
|
242
|
-
const err = new APIError(418, undefined, 'teapot',
|
|
242
|
+
const err = new APIError(418, undefined, 'teapot', new Headers());
|
|
243
243
|
const t = new WhisperTranscriber({ client: throwingOpenAI(err) });
|
|
244
244
|
await expect(t.transcribe(audio, { mimeType: 'audio/ogg' })).rejects.toMatchObject({
|
|
245
245
|
code: 'PROVIDER_BAD_REQUEST',
|