@memberjunction/ai-openai 6.1.0-edge.3 → 6.1.0-edge.5
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/dist/models/tts.d.ts +19 -1
- package/dist/models/tts.d.ts.map +1 -1
- package/dist/models/tts.js +112 -4
- package/dist/models/tts.js.map +1 -1
- package/package.json +3 -3
package/dist/models/tts.d.ts
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
import { BaseAudioGenerator, TextToSpeechParams, SpeechResult, SpeechToTextParams, VoiceInfo, AudioModel, PronounciationDictionary } from "@memberjunction/ai";
|
|
1
|
+
import { AudioSplitter, BaseAudioGenerator, TextToSpeechParams, SpeechResult, SpeechToTextParams, VoiceInfo, AudioModel, PronounciationDictionary } from "@memberjunction/ai";
|
|
2
2
|
export declare class OpenAIAudioGenerator extends BaseAudioGenerator {
|
|
3
3
|
private _openAI;
|
|
4
4
|
constructor(apiKey: string);
|
|
5
|
+
/**
|
|
6
|
+
* Optional splitter used only when audio exceeds OpenAI's upload ceiling. See
|
|
7
|
+
* {@link AudioSplitter} for why splitting is injected rather than bundled.
|
|
8
|
+
*/
|
|
9
|
+
Splitter: AudioSplitter | null;
|
|
5
10
|
CreateSpeech(params: TextToSpeechParams): Promise<SpeechResult>;
|
|
11
|
+
/**
|
|
12
|
+
* Transcribes audio to text using OpenAI's Whisper endpoint.
|
|
13
|
+
*
|
|
14
|
+
* Audio above the 25MB upload ceiling requires an {@link AudioSplitter} on {@link Splitter};
|
|
15
|
+
* without one, oversized audio fails with a message naming the option rather than silently
|
|
16
|
+
* transcribing a truncated prefix. Pieces are transcribed sequentially — see
|
|
17
|
+
* {@link BaseAudioGenerator.TranscribeWithSplitting}.
|
|
18
|
+
*/
|
|
6
19
|
SpeechToText(params: SpeechToTextParams): Promise<SpeechResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve the audio bytes from whichever of the two input forms the caller used.
|
|
22
|
+
*/
|
|
23
|
+
private resolveAudio;
|
|
24
|
+
private transcribeOne;
|
|
7
25
|
GetVoices(): Promise<VoiceInfo[]>;
|
|
8
26
|
GetModels(): Promise<AudioModel[]>;
|
|
9
27
|
GetPronounciationDictionaries(): Promise<PronounciationDictionary[]>;
|
package/dist/models/tts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tts.d.ts","sourceRoot":"","sources":["../../src/models/tts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"tts.d.ts","sourceRoot":"","sources":["../../src/models/tts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,EAAE,kBAAkB,EAAsB,SAAS,EAAE,UAAU,EAAc,wBAAwB,EAAiB,MAAM,oBAAoB,CAAC;AAkC7N,qBACa,oBAAqB,SAAQ,kBAAkB;IACxD,OAAO,CAAC,OAAO,CAAS;gBAEZ,MAAM,EAAE,MAAM;IAK1B;;;OAGG;IACI,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAQ;IAEhC,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAwB5E;;;;;;;OAOG;IACU,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAsC5E;;OAEG;IACH,OAAO,CAAC,YAAY;YAUN,aAAa;IAyBd,SAAS,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAWjC,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAuBlC,6BAA6B,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAIpE,mBAAmB;CAGnC"}
|
package/dist/models/tts.js
CHANGED
|
@@ -8,11 +8,43 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { RegisterClass } from "@memberjunction/global";
|
|
11
|
-
import { BaseAudioGenerator, SpeechResult, ErrorAnalyzer } from "@memberjunction/ai";
|
|
12
|
-
import { OpenAI } from "openai";
|
|
11
|
+
import { BaseAudioGenerator, SpeechResult, ModelUsage, ErrorAnalyzer } from "@memberjunction/ai";
|
|
12
|
+
import { OpenAI, toFile } from "openai";
|
|
13
|
+
/**
|
|
14
|
+
* OpenAI's documented upload ceiling for the transcription endpoint. Requests above it are
|
|
15
|
+
* rejected outright, so it is a hard boundary rather than a tuning knob.
|
|
16
|
+
*/
|
|
17
|
+
const MAX_UPLOAD_BYTES = 25 * 1024 * 1024;
|
|
18
|
+
/**
|
|
19
|
+
* Leave headroom under the ceiling: multipart framing and the form fields ride along with the
|
|
20
|
+
* audio, and a piece sized exactly at the limit fails for the overhead alone.
|
|
21
|
+
*/
|
|
22
|
+
const SPLIT_TARGET_BYTES = 24 * 1024 * 1024;
|
|
23
|
+
/**
|
|
24
|
+
* OpenAI's transcription model. Note this endpoint serves Whisper large-v2 weights, not the v3
|
|
25
|
+
* checkpoint other providers host under the "Whisper Large v3" name.
|
|
26
|
+
*/
|
|
27
|
+
const DEFAULT_TRANSCRIPTION_MODEL = "whisper-1";
|
|
28
|
+
/**
|
|
29
|
+
* Whether a transcription model accepts `response_format: 'verbose_json'`.
|
|
30
|
+
*
|
|
31
|
+
* Only the Whisper endpoint does. OpenAI's GPT-4o transcription models accept `json` and `text`
|
|
32
|
+
* ONLY and reject `verbose_json` outright, so asking for it unconditionally would turn a working
|
|
33
|
+
* transcription into a 400 for anyone passing one of those model names. They report no duration
|
|
34
|
+
* either way, so those runs stay uncosted — which is the honest outcome, and far better than
|
|
35
|
+
* failing the transcription to chase a number the endpoint never returns.
|
|
36
|
+
*/
|
|
37
|
+
function supportsVerboseJson(model) {
|
|
38
|
+
return model.toLowerCase().startsWith("whisper");
|
|
39
|
+
}
|
|
13
40
|
let OpenAIAudioGenerator = class OpenAIAudioGenerator extends BaseAudioGenerator {
|
|
14
41
|
constructor(apiKey) {
|
|
15
42
|
super(apiKey);
|
|
43
|
+
/**
|
|
44
|
+
* Optional splitter used only when audio exceeds OpenAI's upload ceiling. See
|
|
45
|
+
* {@link AudioSplitter} for why splitting is injected rather than bundled.
|
|
46
|
+
*/
|
|
47
|
+
this.Splitter = null;
|
|
16
48
|
this._openAI = new OpenAI({ apiKey: apiKey });
|
|
17
49
|
}
|
|
18
50
|
async CreateSpeech(params) {
|
|
@@ -38,8 +70,75 @@ let OpenAIAudioGenerator = class OpenAIAudioGenerator extends BaseAudioGenerator
|
|
|
38
70
|
}
|
|
39
71
|
return speechResult;
|
|
40
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Transcribes audio to text using OpenAI's Whisper endpoint.
|
|
75
|
+
*
|
|
76
|
+
* Audio above the 25MB upload ceiling requires an {@link AudioSplitter} on {@link Splitter};
|
|
77
|
+
* without one, oversized audio fails with a message naming the option rather than silently
|
|
78
|
+
* transcribing a truncated prefix. Pieces are transcribed sequentially — see
|
|
79
|
+
* {@link BaseAudioGenerator.TranscribeWithSplitting}.
|
|
80
|
+
*/
|
|
41
81
|
async SpeechToText(params) {
|
|
42
|
-
|
|
82
|
+
const result = new SpeechResult();
|
|
83
|
+
try {
|
|
84
|
+
const audio = this.resolveAudio(params);
|
|
85
|
+
const model = params.model || DEFAULT_TRANSCRIPTION_MODEL;
|
|
86
|
+
const transcription = await this.TranscribeWithSplitting(audio, MAX_UPLOAD_BYTES, SPLIT_TARGET_BYTES, this.Splitter, "OpenAI", (piece) => this.transcribeOne(piece, model, params));
|
|
87
|
+
if (transcription.text.trim().length === 0) {
|
|
88
|
+
// Whisper returns an empty string both for silence and for audio it could not
|
|
89
|
+
// decode. Reported as success, an empty transcript gets stored as if it were
|
|
90
|
+
// the content.
|
|
91
|
+
throw new Error("Transcription returned no text; the audio may be silent or in an unsupported format");
|
|
92
|
+
}
|
|
93
|
+
result.success = true;
|
|
94
|
+
result.content = transcription.text;
|
|
95
|
+
if (transcription.durationSeconds != null) {
|
|
96
|
+
// OpenAI bills whisper-1 per minute of audio, so duration is the billable
|
|
97
|
+
// quantity — without it a transcription run prices as free.
|
|
98
|
+
result.usage = ModelUsage.ForMedia("Seconds", transcription.durationSeconds);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
const errorInfo = ErrorAnalyzer.analyzeError(error, 'OpenAI Whisper');
|
|
103
|
+
result.success = false;
|
|
104
|
+
result.errorMessage = error?.message || 'Unknown error occurred';
|
|
105
|
+
console.error(`OpenAI Whisper error:`, error, errorInfo);
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Resolve the audio bytes from whichever of the two input forms the caller used.
|
|
111
|
+
*/
|
|
112
|
+
resolveAudio(params) {
|
|
113
|
+
if (params.audioData && params.audioData.byteLength > 0) {
|
|
114
|
+
return params.audioData;
|
|
115
|
+
}
|
|
116
|
+
if (params.audioFile && params.audioFile.length > 0) {
|
|
117
|
+
return Buffer.from(params.audioFile, 'base64');
|
|
118
|
+
}
|
|
119
|
+
throw new Error('SpeechToText requires either audioData (Buffer) or audioFile (base 64 string)');
|
|
120
|
+
}
|
|
121
|
+
async transcribeOne(audio, model, params) {
|
|
122
|
+
// `verbose_json` rather than `json` purely for the `duration` field — the quantity OpenAI
|
|
123
|
+
// bills by. The transcript text is identical between the two formats. Models that reject
|
|
124
|
+
// verbose_json fall back to `json` and simply report no duration.
|
|
125
|
+
const response = await this._openAI.audio.transcriptions.create({
|
|
126
|
+
file: await toFile(audio, params.fileName || 'audio.mp3'),
|
|
127
|
+
model,
|
|
128
|
+
response_format: supportsVerboseJson(model) ? 'verbose_json' : 'json',
|
|
129
|
+
language: params.language,
|
|
130
|
+
prompt: params.prompt,
|
|
131
|
+
temperature: params.temperature
|
|
132
|
+
});
|
|
133
|
+
// `> 0`, not `>= 0`: a zero duration is not a billable quantity. Accepting it produces
|
|
134
|
+
// `ForMedia('Seconds', 0)`, which the pricing layer then refuses as "a measure with no
|
|
135
|
+
// quantity" and logs as an error — the right outcome reached by a route that reports
|
|
136
|
+
// genuinely silent audio as a fault. Leaving usage undefined says the same thing quietly.
|
|
137
|
+
const reported = response.duration;
|
|
138
|
+
const duration = typeof reported === 'number' && isFinite(reported) && reported > 0
|
|
139
|
+
? reported
|
|
140
|
+
: undefined;
|
|
141
|
+
return { text: response.text ?? '', durationSeconds: duration };
|
|
43
142
|
}
|
|
44
143
|
async GetVoices() {
|
|
45
144
|
return [
|
|
@@ -61,6 +160,15 @@ let OpenAIAudioGenerator = class OpenAIAudioGenerator extends BaseAudioGenerator
|
|
|
61
160
|
supportsStyle: false,
|
|
62
161
|
supportsSpeakerBoost: false,
|
|
63
162
|
supportsFineTuning: false
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: DEFAULT_TRANSCRIPTION_MODEL,
|
|
166
|
+
name: "Whisper 1",
|
|
167
|
+
supportsTextToSpeech: false,
|
|
168
|
+
supportsVoiceConversion: false,
|
|
169
|
+
supportsStyle: false,
|
|
170
|
+
supportsSpeakerBoost: false,
|
|
171
|
+
supportsFineTuning: false
|
|
64
172
|
}
|
|
65
173
|
];
|
|
66
174
|
}
|
|
@@ -68,7 +176,7 @@ let OpenAIAudioGenerator = class OpenAIAudioGenerator extends BaseAudioGenerator
|
|
|
68
176
|
return [];
|
|
69
177
|
}
|
|
70
178
|
async GetSupportedMethods() {
|
|
71
|
-
return ["CreateSpeech", "GetVoices", "GetModels"];
|
|
179
|
+
return ["CreateSpeech", "SpeechToText", "GetVoices", "GetModels"];
|
|
72
180
|
}
|
|
73
181
|
};
|
|
74
182
|
OpenAIAudioGenerator = __decorate([
|
package/dist/models/tts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tts.js","sourceRoot":"","sources":["../../src/models/tts.ts"],"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description": "MemberJunction Wrapper for OpenAI AI Models",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"typescript": "^5.9.3"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@memberjunction/ai": "6.1.0-edge.
|
|
19
|
-
"@memberjunction/global": "6.1.0-edge.
|
|
18
|
+
"@memberjunction/ai": "6.1.0-edge.5",
|
|
19
|
+
"@memberjunction/global": "6.1.0-edge.5",
|
|
20
20
|
"openai": "6.18.0"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|