ai 4.3.3 → 4.3.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/CHANGELOG.md +11 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
@@ -6304,7 +6304,7 @@ async function transcribe({
|
|
6304
6304
|
headers
|
6305
6305
|
}) {
|
6306
6306
|
const { retry } = prepareRetries({ maxRetries: maxRetriesArg });
|
6307
|
-
const audioData = audio instanceof URL ?
|
6307
|
+
const audioData = audio instanceof URL ? (await download({ url: audio })).data : convertDataContentToUint8Array(audio);
|
6308
6308
|
const result = await retry(
|
6309
6309
|
() => {
|
6310
6310
|
var _a17;
|
@@ -6313,7 +6313,7 @@ async function transcribe({
|
|
6313
6313
|
abortSignal,
|
6314
6314
|
headers,
|
6315
6315
|
providerOptions,
|
6316
|
-
|
6316
|
+
mediaType: (_a17 = detectMimeType({
|
6317
6317
|
data: audioData,
|
6318
6318
|
signatures: audioMimeTypeSignatures
|
6319
6319
|
})) != null ? _a17 : "audio/wav"
|