2026-06-06 20:12:40 +07:00
parent de84b2bf48
commit 97ac0f71f5
13682 changed files with 1125938 additions and 0 deletions
@@ -0,0 +1,26 @@
import { APIResource } from "../../resource.js";
import * as SpeechAPI from "./speech.js";
import { Speech, SpeechCreateParams, SpeechModel } from "./speech.js";
import * as TranscriptionsAPI from "./transcriptions.js";
import { Transcription, TranscriptionCreateParams, TranscriptionCreateParamsNonStreaming, TranscriptionCreateParamsStreaming, TranscriptionCreateResponse, TranscriptionInclude, TranscriptionSegment, TranscriptionStreamEvent, TranscriptionTextDeltaEvent, TranscriptionTextDoneEvent, TranscriptionVerbose, TranscriptionWord, Transcriptions } from "./transcriptions.js";
import * as TranslationsAPI from "./translations.js";
import { Translation, TranslationCreateParams, TranslationCreateResponse, TranslationVerbose, Translations } from "./translations.js";
export declare class Audio extends APIResource {
transcriptions: TranscriptionsAPI.Transcriptions;
translations: TranslationsAPI.Translations;
speech: SpeechAPI.Speech;
}
export type AudioModel = 'whisper-1' | 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe';
/**
* The format of the output, in one of these options: `json`, `text`, `srt`,
* `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`,
* the only supported format is `json`.
*/
export type AudioResponseFormat = 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt';
export declare namespace Audio {
export { type AudioModel as AudioModel, type AudioResponseFormat as AudioResponseFormat };
export { Transcriptions as Transcriptions, type Transcription as Transcription, type TranscriptionInclude as TranscriptionInclude, type TranscriptionSegment as TranscriptionSegment, type TranscriptionStreamEvent as TranscriptionStreamEvent, type TranscriptionTextDeltaEvent as TranscriptionTextDeltaEvent, type TranscriptionTextDoneEvent as TranscriptionTextDoneEvent, type TranscriptionVerbose as TranscriptionVerbose, type TranscriptionWord as TranscriptionWord, type TranscriptionCreateResponse as TranscriptionCreateResponse, type TranscriptionCreateParams as TranscriptionCreateParams, type TranscriptionCreateParamsNonStreaming as TranscriptionCreateParamsNonStreaming, type TranscriptionCreateParamsStreaming as TranscriptionCreateParamsStreaming, };
export { Translations as Translations, type Translation as Translation, type TranslationVerbose as TranslationVerbose, type TranslationCreateResponse as TranslationCreateResponse, type TranslationCreateParams as TranslationCreateParams, };
export { Speech as Speech, type SpeechModel as SpeechModel, type SpeechCreateParams as SpeechCreateParams };
}
//# sourceMappingURL=audio.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../src/resources/audio/audio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,KAAK,iBAAiB,MAAM,kBAAkB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,qCAAqC,EACrC,kCAAkC,EAClC,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAClD,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,yBAAyB,EACzB,kBAAkB,EAClB,YAAY,EACb,MAAM,gBAAgB,CAAC;AAExB,qBAAa,KAAM,SAAQ,WAAW;IACpC,cAAc,EAAE,iBAAiB,CAAC,cAAc,CAAsD;IACtG,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAC5F,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;CAC/D;AAED,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,mBAAmB,GAAG,wBAAwB,CAAC;AAEtF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,cAAc,GAAG,KAAK,CAAC;AAMnF,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,UAAU,IAAI,UAAU,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;IAE1F,OAAO,EACL,cAAc,IAAI,cAAc,EAChC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,kCAAkC,IAAI,kCAAkC,GAC9E,CAAC;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;IAEF,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC7G"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 11a2acdfffede411a9470ce04912e188
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/audio.d.ts.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: ce2b948a2febf4bf5ad6b308c25a380f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/audio.d.ts
uploadId: 920982
@@ -0,0 +1,47 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Audio = void 0;
const resource_1 = require("../../resource.js");
const SpeechAPI = __importStar(require("./speech.js"));
const speech_1 = require("./speech.js");
const TranscriptionsAPI = __importStar(require("./transcriptions.js"));
const transcriptions_1 = require("./transcriptions.js");
const TranslationsAPI = __importStar(require("./translations.js"));
const translations_1 = require("./translations.js");
class Audio extends resource_1.APIResource {
constructor() {
super(...arguments);
this.transcriptions = new TranscriptionsAPI.Transcriptions(this._client);
this.translations = new TranslationsAPI.Translations(this._client);
this.speech = new SpeechAPI.Speech(this._client);
}
}
exports.Audio = Audio;
Audio.Transcriptions = transcriptions_1.Transcriptions;
Audio.Translations = translations_1.Translations;
Audio.Speech = speech_1.Speech;
//# sourceMappingURL=audio.js.map
@@ -0,0 +1 @@
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/resources/audio/audio.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,uDAAsC;AACtC,wCAAmE;AACnE,uEAAsD;AACtD,wDAc0B;AAC1B,mEAAkD;AAClD,oDAMwB;AAExB,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,mBAAc,GAAqC,IAAI,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtG,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;CAAA;AAJD,sBAIC;AAWD,KAAK,CAAC,cAAc,GAAG,+BAAc,CAAC;AACtC,KAAK,CAAC,YAAY,GAAG,2BAAY,CAAC;AAClC,KAAK,CAAC,MAAM,GAAG,eAAM,CAAC"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 932d86e6d12714c37bf09dd42cf34631
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/audio.js.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 46000afbe7b0d472199a00698caa329c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/audio.js
uploadId: 920982
@@ -0,0 +1,20 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../resource.mjs";
import * as SpeechAPI from "./speech.mjs";
import { Speech } from "./speech.mjs";
import * as TranscriptionsAPI from "./transcriptions.mjs";
import { Transcriptions, } from "./transcriptions.mjs";
import * as TranslationsAPI from "./translations.mjs";
import { Translations, } from "./translations.mjs";
export class Audio extends APIResource {
constructor() {
super(...arguments);
this.transcriptions = new TranscriptionsAPI.Transcriptions(this._client);
this.translations = new TranslationsAPI.Translations(this._client);
this.speech = new SpeechAPI.Speech(this._client);
}
}
Audio.Transcriptions = Transcriptions;
Audio.Translations = Translations;
Audio.Speech = Speech;
//# sourceMappingURL=audio.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"audio.mjs","sourceRoot":"","sources":["../../src/resources/audio/audio.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAmC;OAC3C,KAAK,iBAAiB;OACtB,EAaL,cAAc,GACf;OACM,KAAK,eAAe;OACpB,EAKL,YAAY,GACb;AAED,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,mBAAc,GAAqC,IAAI,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtG,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;CAAA;AAWD,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;AACtC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;AAClC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 8d46484eaaa1b46ffb5b3ec5cafe1f91
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/audio.mjs.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 847e321e9bedc4f97a6916f92e195f77
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/audio.mjs
uploadId: 920982
@@ -0,0 +1,5 @@
export { Audio, type AudioModel, type AudioResponseFormat } from "./audio.js";
export { Speech, type SpeechModel, type SpeechCreateParams } from "./speech.js";
export { Transcriptions, type Transcription, type TranscriptionInclude, type TranscriptionSegment, type TranscriptionStreamEvent, type TranscriptionTextDeltaEvent, type TranscriptionTextDoneEvent, type TranscriptionVerbose, type TranscriptionWord, type TranscriptionCreateResponse, type TranscriptionCreateParams, type TranscriptionCreateParamsNonStreaming, type TranscriptionCreateParamsStreaming, } from "./transcriptions.js";
export { Translations, type Translation, type TranslationVerbose, type TranslationCreateResponse, type TranslationCreateParams, } from "./translations.js";
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/audio/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,qCAAqC,EAC1C,KAAK,kCAAkC,GACxC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 335786917ad25436b8a3f724e67729ba
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/index.d.ts.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 96273366de5cf409586fbc47416af308
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/index.d.ts
uploadId: 920982
@@ -0,0 +1,13 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Translations = exports.Transcriptions = exports.Speech = exports.Audio = void 0;
var audio_1 = require("./audio.js");
Object.defineProperty(exports, "Audio", { enumerable: true, get: function () { return audio_1.Audio; } });
var speech_1 = require("./speech.js");
Object.defineProperty(exports, "Speech", { enumerable: true, get: function () { return speech_1.Speech; } });
var transcriptions_1 = require("./transcriptions.js");
Object.defineProperty(exports, "Transcriptions", { enumerable: true, get: function () { return transcriptions_1.Transcriptions; } });
var translations_1 = require("./translations.js");
Object.defineProperty(exports, "Translations", { enumerable: true, get: function () { return translations_1.Translations; } });
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/audio/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAA2E;AAAlE,8FAAA,KAAK,OAAA;AACd,sCAA6E;AAApE,gGAAA,MAAM,OAAA;AACf,sDAc0B;AAbxB,gHAAA,cAAc,OAAA;AAchB,kDAMwB;AALtB,4GAAA,YAAY,OAAA"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 358631081d4454852b95294d81726b1e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/index.js.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 36aab74e0e69240b6b74df6f76790632
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/index.js
uploadId: 920982
@@ -0,0 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { Audio } from "./audio.mjs";
export { Speech } from "./speech.mjs";
export { Transcriptions, } from "./transcriptions.mjs";
export { Translations, } from "./translations.mjs";
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/audio/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,KAAK,EAA6C;OACpD,EAAE,MAAM,EAA6C;OACrD,EACL,cAAc,GAaf;OACM,EACL,YAAY,GAKb"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: aac039442148344178d2abd47bf73c34
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/index.mjs.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 587bb83d0bbd04a8a99945c9ae927ce7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/index.mjs
uploadId: 920982
@@ -0,0 +1,59 @@
import { APIResource } from "../../resource.js";
import * as Core from "../../core.js";
import { type Response } from "../../_shims/index.js";
export declare class Speech extends APIResource {
/**
* Generates audio from the input text.
*
* @example
* ```ts
* const speech = await client.audio.speech.create({
* input: 'input',
* model: 'string',
* voice: 'ash',
* });
*
* const content = await speech.blob();
* console.log(content);
* ```
*/
create(body: SpeechCreateParams, options?: Core.RequestOptions): Core.APIPromise<Response>;
}
export type SpeechModel = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts';
export interface SpeechCreateParams {
/**
* The text to generate audio for. The maximum length is 4096 characters.
*/
input: string;
/**
* One of the available [TTS models](https://platform.openai.com/docs/models#tts):
* `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
*/
model: (string & {}) | SpeechModel;
/**
* The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
* `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
* `verse`. Previews of the voices are available in the
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
*/
voice: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'fable' | 'onyx' | 'nova' | 'sage' | 'shimmer' | 'verse';
/**
* Control the voice of your generated audio with additional instructions. Does not
* work with `tts-1` or `tts-1-hd`.
*/
instructions?: string;
/**
* The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
* `wav`, and `pcm`.
*/
response_format?: 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm';
/**
* The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is
* the default. Does not work with `gpt-4o-mini-tts`.
*/
speed?: number;
}
export declare namespace Speech {
export { type SpeechModel as SpeechModel, type SpeechCreateParams as SpeechCreateParams };
}
//# sourceMappingURL=speech.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"speech.d.ts","sourceRoot":"","sources":["../../src/resources/audio/speech.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;CAQ3F;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,iBAAiB,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,WAAW,CAAC;IAEnC;;;;;OAKG;IACH,KAAK,EACD,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,OAAO,GACP,KAAK,GACL,QAAQ,GACR,OAAO,GACP,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,OAAO,CAAC;IAEZ;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IAElE;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC3F"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: fb1618648807e4bdfba743e507d23c57
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/speech.d.ts.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 613c9c8bf110f4d28997a7101014d706
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/speech.d.ts
uploadId: 920982
@@ -0,0 +1,32 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Speech = void 0;
const resource_1 = require("../../resource.js");
class Speech extends resource_1.APIResource {
/**
* Generates audio from the input text.
*
* @example
* ```ts
* const speech = await client.audio.speech.create({
* input: 'input',
* model: 'string',
* voice: 'ash',
* });
*
* const content = await speech.blob();
* console.log(content);
* ```
*/
create(body, options) {
return this._client.post('/audio/speech', {
body,
...options,
headers: { Accept: 'application/octet-stream', ...options?.headers },
__binaryResponse: true,
});
}
}
exports.Speech = Speech;
//# sourceMappingURL=speech.js.map
@@ -0,0 +1 @@
{"version":3,"file":"speech.js","sourceRoot":"","sources":["../../src/resources/audio/speech.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAI7C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,0BAA0B,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;YACpE,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,wBAwBC"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 6e599a8e1a6bb4334893b437475734b2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/speech.js.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 96527633360954ebd851af860ff700e1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/speech.js
uploadId: 920982
@@ -0,0 +1,28 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../resource.mjs";
export class Speech extends APIResource {
/**
* Generates audio from the input text.
*
* @example
* ```ts
* const speech = await client.audio.speech.create({
* input: 'input',
* model: 'string',
* voice: 'ash',
* });
*
* const content = await speech.blob();
* console.log(content);
* ```
*/
create(body, options) {
return this._client.post('/audio/speech', {
body,
...options,
headers: { Accept: 'application/octet-stream', ...options?.headers },
__binaryResponse: true,
});
}
}
//# sourceMappingURL=speech.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"speech.mjs","sourceRoot":"","sources":["../../src/resources/audio/speech.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,0BAA0B,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;YACpE,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 7e8d1a697efde46bba63cd052236f595
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/speech.mjs.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 9ac9b49f83fbd4437b9b33d92d8b6984
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/speech.mjs
uploadId: 920982
@@ -0,0 +1,363 @@
import { APIResource } from "../../resource.js";
import * as Core from "../../core.js";
import * as TranscriptionsAPI from "./transcriptions.js";
import * as AudioAPI from "./audio.js";
import { Stream } from "../../streaming.js";
export declare class Transcriptions extends APIResource {
/**
* Transcribes audio into the input language.
*
* @example
* ```ts
* const transcription =
* await client.audio.transcriptions.create({
* file: fs.createReadStream('speech.mp3'),
* model: 'gpt-4o-transcribe',
* });
* ```
*/
create(body: TranscriptionCreateParamsNonStreaming<'json' | undefined>, options?: Core.RequestOptions): Core.APIPromise<Transcription>;
create(body: TranscriptionCreateParamsNonStreaming<'verbose_json'>, options?: Core.RequestOptions): Core.APIPromise<TranscriptionVerbose>;
create(body: TranscriptionCreateParamsNonStreaming<'srt' | 'vtt' | 'text'>, options?: Core.RequestOptions): Core.APIPromise<string>;
create(body: TranscriptionCreateParamsNonStreaming, options?: Core.RequestOptions): Core.APIPromise<Transcription>;
create(body: TranscriptionCreateParamsStreaming, options?: Core.RequestOptions): Core.APIPromise<Stream<TranscriptionStreamEvent>>;
create(body: TranscriptionCreateParamsStreaming, options?: Core.RequestOptions): Core.APIPromise<TranscriptionCreateResponse | string | Stream<TranscriptionStreamEvent>>;
}
/**
* Represents a transcription response returned by model, based on the provided
* input.
*/
export interface Transcription {
/**
* The transcribed text.
*/
text: string;
/**
* The log probabilities of the tokens in the transcription. Only returned with the
* models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added
* to the `include` array.
*/
logprobs?: Array<Transcription.Logprob>;
}
export declare namespace Transcription {
interface Logprob {
/**
* The token in the transcription.
*/
token?: string;
/**
* The bytes of the token.
*/
bytes?: Array<number>;
/**
* The log probability of the token.
*/
logprob?: number;
}
}
export type TranscriptionInclude = 'logprobs';
export interface TranscriptionSegment {
/**
* Unique identifier of the segment.
*/
id: number;
/**
* Average logprob of the segment. If the value is lower than -1, consider the
* logprobs failed.
*/
avg_logprob: number;
/**
* Compression ratio of the segment. If the value is greater than 2.4, consider the
* compression failed.
*/
compression_ratio: number;
/**
* End time of the segment in seconds.
*/
end: number;
/**
* Probability of no speech in the segment. If the value is higher than 1.0 and the
* `avg_logprob` is below -1, consider this segment silent.
*/
no_speech_prob: number;
/**
* Seek offset of the segment.
*/
seek: number;
/**
* Start time of the segment in seconds.
*/
start: number;
/**
* Temperature parameter used for generating the segment.
*/
temperature: number;
/**
* Text content of the segment.
*/
text: string;
/**
* Array of token IDs for the text content.
*/
tokens: Array<number>;
}
/**
* Emitted when there is an additional text delta. This is also the first event
* emitted when the transcription starts. Only emitted when you
* [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription)
* with the `Stream` parameter set to `true`.
*/
export type TranscriptionStreamEvent = TranscriptionTextDeltaEvent | TranscriptionTextDoneEvent;
/**
* Emitted when there is an additional text delta. This is also the first event
* emitted when the transcription starts. Only emitted when you
* [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription)
* with the `Stream` parameter set to `true`.
*/
export interface TranscriptionTextDeltaEvent {
/**
* The text delta that was additionally transcribed.
*/
delta: string;
/**
* The type of the event. Always `transcript.text.delta`.
*/
type: 'transcript.text.delta';
/**
* The log probabilities of the delta. Only included if you
* [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription)
* with the `include[]` parameter set to `logprobs`.
*/
logprobs?: Array<TranscriptionTextDeltaEvent.Logprob>;
}
export declare namespace TranscriptionTextDeltaEvent {
interface Logprob {
/**
* The token that was used to generate the log probability.
*/
token?: string;
/**
* The bytes that were used to generate the log probability.
*/
bytes?: Array<unknown>;
/**
* The log probability of the token.
*/
logprob?: number;
}
}
/**
* Emitted when the transcription is complete. Contains the complete transcription
* text. Only emitted when you
* [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription)
* with the `Stream` parameter set to `true`.
*/
export interface TranscriptionTextDoneEvent {
/**
* The text that was transcribed.
*/
text: string;
/**
* The type of the event. Always `transcript.text.done`.
*/
type: 'transcript.text.done';
/**
* The log probabilities of the individual tokens in the transcription. Only
* included if you
* [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription)
* with the `include[]` parameter set to `logprobs`.
*/
logprobs?: Array<TranscriptionTextDoneEvent.Logprob>;
}
export declare namespace TranscriptionTextDoneEvent {
interface Logprob {
/**
* The token that was used to generate the log probability.
*/
token?: string;
/**
* The bytes that were used to generate the log probability.
*/
bytes?: Array<unknown>;
/**
* The log probability of the token.
*/
logprob?: number;
}
}
/**
* Represents a verbose json transcription response returned by model, based on the
* provided input.
*/
export interface TranscriptionVerbose {
/**
* The duration of the input audio.
*/
duration: number;
/**
* The language of the input audio.
*/
language: string;
/**
* The transcribed text.
*/
text: string;
/**
* Segments of the transcribed text and their corresponding details.
*/
segments?: Array<TranscriptionSegment>;
/**
* Extracted words and their corresponding timestamps.
*/
words?: Array<TranscriptionWord>;
}
export interface TranscriptionWord {
/**
* End time of the word in seconds.
*/
end: number;
/**
* Start time of the word in seconds.
*/
start: number;
/**
* The text content of the word.
*/
word: string;
}
/**
* Represents a transcription response returned by model, based on the provided
* input.
*/
export type TranscriptionCreateResponse = Transcription | TranscriptionVerbose;
export type TranscriptionCreateParams<ResponseFormat extends AudioAPI.AudioResponseFormat | undefined = AudioAPI.AudioResponseFormat | undefined> = TranscriptionCreateParamsNonStreaming<ResponseFormat> | TranscriptionCreateParamsStreaming;
export interface TranscriptionCreateParamsBase<ResponseFormat extends AudioAPI.AudioResponseFormat | undefined = AudioAPI.AudioResponseFormat | undefined> {
/**
* The audio file object (not file name) to transcribe, in one of these formats:
* flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
*/
file: Core.Uploadable;
/**
* ID of the model to use. The options are `gpt-4o-transcribe`,
* `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source
* Whisper V2 model).
*/
model: (string & {}) | AudioAPI.AudioModel;
/**
* Controls how the audio is cut into chunks. When set to `"auto"`, the server
* first normalizes loudness and then uses voice activity detection (VAD) to choose
* boundaries. `server_vad` object can be provided to tweak VAD detection
* parameters manually. If unset, the audio is transcribed as a single block.
*/
chunking_strategy?: 'auto' | TranscriptionCreateParams.VadConfig | null;
/**
* Additional information to include in the transcription response. `logprobs` will
* return the log probabilities of the tokens in the response to understand the
* model's confidence in the transcription. `logprobs` only works with
* response_format set to `json` and only with the models `gpt-4o-transcribe` and
* `gpt-4o-mini-transcribe`.
*/
include?: Array<TranscriptionInclude>;
/**
* The language of the input audio. Supplying the input language in
* [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
* format will improve accuracy and latency.
*/
language?: string;
/**
* An optional text to guide the model's style or continue a previous audio
* segment. The
* [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
* should match the audio language.
*/
prompt?: string;
/**
* The format of the output, in one of these options: `json`, `text`, `srt`,
* `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`,
* the only supported format is `json`.
*/
response_format?: ResponseFormat;
/**
* If set to true, the model response data will be streamed to the client as it is
* generated using
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
* See the
* [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)
* for more information.
*
* Note: Streaming is not supported for the `whisper-1` model and will be ignored.
*/
stream?: boolean | null;
/**
* The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
* output more random, while lower values like 0.2 will make it more focused and
* deterministic. If set to 0, the model will use
* [log probability](https://en.wikipedia.org/wiki/Log_probability) to
* automatically increase the temperature until certain thresholds are hit.
*/
temperature?: number;
/**
* The timestamp granularities to populate for this transcription.
* `response_format` must be set `verbose_json` to use timestamp granularities.
* Either or both of these options are supported: `word`, or `segment`. Note: There
* is no additional latency for segment timestamps, but generating word timestamps
* incurs additional latency.
*/
timestamp_granularities?: Array<'word' | 'segment'>;
}
export declare namespace TranscriptionCreateParams {
interface VadConfig {
/**
* Must be set to `server_vad` to enable manual chunking using server side VAD.
*/
type: 'server_vad';
/**
* Amount of audio to include before the VAD detected speech (in milliseconds).
*/
prefix_padding_ms?: number;
/**
* Duration of silence to detect speech stop (in milliseconds). With shorter values
* the model will respond more quickly, but may jump in on short pauses from the
* user.
*/
silence_duration_ms?: number;
/**
* Sensitivity threshold (0.0 to 1.0) for voice activity detection. A higher
* threshold will require louder audio to activate the model, and thus might
* perform better in noisy environments.
*/
threshold?: number;
}
type TranscriptionCreateParamsNonStreaming = TranscriptionsAPI.TranscriptionCreateParamsNonStreaming;
type TranscriptionCreateParamsStreaming = TranscriptionsAPI.TranscriptionCreateParamsStreaming;
}
export interface TranscriptionCreateParamsNonStreaming<ResponseFormat extends AudioAPI.AudioResponseFormat | undefined = AudioAPI.AudioResponseFormat | undefined> extends TranscriptionCreateParamsBase<ResponseFormat> {
/**
* If set to true, the model response data will be streamed to the client as it is
* generated using
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
* See the
* [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)
* for more information.
*
* Note: Streaming is not supported for the `whisper-1` model and will be ignored.
*/
stream?: false | null;
}
export interface TranscriptionCreateParamsStreaming extends TranscriptionCreateParamsBase {
/**
* If set to true, the model response data will be streamed to the client as it is
* generated using
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
* See the
* [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)
* for more information.
*
* Note: Streaming is not supported for the `whisper-1` model and will be ignored.
*/
stream: true;
}
export declare namespace Transcriptions {
export { type Transcription as Transcription, type TranscriptionInclude as TranscriptionInclude, type TranscriptionSegment as TranscriptionSegment, type TranscriptionStreamEvent as TranscriptionStreamEvent, type TranscriptionTextDeltaEvent as TranscriptionTextDeltaEvent, type TranscriptionTextDoneEvent as TranscriptionTextDoneEvent, type TranscriptionVerbose as TranscriptionVerbose, type TranscriptionWord as TranscriptionWord, type TranscriptionCreateResponse as TranscriptionCreateResponse, type TranscriptionCreateParams as TranscriptionCreateParams, type TranscriptionCreateParamsNonStreaming as TranscriptionCreateParamsNonStreaming, type TranscriptionCreateParamsStreaming as TranscriptionCreateParamsStreaming, };
}
//# sourceMappingURL=transcriptions.d.ts.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 401b7faea7a5f47d8842f160327a14ae
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/transcriptions.d.ts.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: a0aa50c50120d478aa8b6b8fb44319e7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/transcriptions.d.ts
uploadId: 920982
@@ -0,0 +1,41 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Transcriptions = void 0;
const resource_1 = require("../../resource.js");
const Core = __importStar(require("../../core.js"));
class Transcriptions extends resource_1.APIResource {
create(body, options) {
return this._client.post('/audio/transcriptions', Core.multipartFormRequestOptions({
body,
...options,
stream: body.stream ?? false,
__metadata: { model: body.model },
}));
}
}
exports.Transcriptions = Transcriptions;
//# sourceMappingURL=transcriptions.js.map
@@ -0,0 +1 @@
{"version":3,"file":"transcriptions.js","sourceRoot":"","sources":["../../src/resources/audio/transcriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,oDAAmC;AAKnC,MAAa,cAAe,SAAQ,sBAAW;IAqC7C,MAAM,CACJ,IAA+B,EAC/B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,uBAAuB,EACvB,IAAI,CAAC,2BAA2B,CAAC;YAC/B,IAAI;YACJ,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;YAC5B,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;SAClC,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AAnDD,wCAmDC"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: cf3578640e7fd4db8ad64fb89226c836
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/transcriptions.js.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 6720d1a625c964599ba84713086a157e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/transcriptions.js
uploadId: 920982
@@ -0,0 +1,14 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../resource.mjs";
import * as Core from "../../core.mjs";
export class Transcriptions extends APIResource {
create(body, options) {
return this._client.post('/audio/transcriptions', Core.multipartFormRequestOptions({
body,
...options,
stream: body.stream ?? false,
__metadata: { model: body.model },
}));
}
}
//# sourceMappingURL=transcriptions.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"transcriptions.mjs","sourceRoot":"","sources":["../../src/resources/audio/transcriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,IAAI;AAKhB,MAAM,OAAO,cAAe,SAAQ,WAAW;IAqC7C,MAAM,CACJ,IAA+B,EAC/B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,uBAAuB,EACvB,IAAI,CAAC,2BAA2B,CAAC;YAC/B,IAAI;YACJ,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;YAC5B,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;SAClC,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 2428058875fb94f419037f54aed6c64d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/transcriptions.mjs.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 724e133f46bc341dd801317e90357053
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/transcriptions.mjs
uploadId: 920982
@@ -0,0 +1,79 @@
import { APIResource } from "../../resource.js";
import * as Core from "../../core.js";
import * as AudioAPI from "./audio.js";
import * as TranscriptionsAPI from "./transcriptions.js";
export declare class Translations extends APIResource {
/**
* Translates audio into English.
*
* @example
* ```ts
* const translation = await client.audio.translations.create({
* file: fs.createReadStream('speech.mp3'),
* model: 'whisper-1',
* });
* ```
*/
create(body: TranslationCreateParams<'json' | undefined>, options?: Core.RequestOptions): Core.APIPromise<Translation>;
create(body: TranslationCreateParams<'verbose_json'>, options?: Core.RequestOptions): Core.APIPromise<TranslationVerbose>;
create(body: TranslationCreateParams<'text' | 'srt' | 'vtt'>, options?: Core.RequestOptions): Core.APIPromise<string>;
create(body: TranslationCreateParams, options?: Core.RequestOptions): Core.APIPromise<Translation>;
}
export interface Translation {
text: string;
}
export interface TranslationVerbose {
/**
* The duration of the input audio.
*/
duration: number;
/**
* The language of the output translation (always `english`).
*/
language: string;
/**
* The translated text.
*/
text: string;
/**
* Segments of the translated text and their corresponding details.
*/
segments?: Array<TranscriptionsAPI.TranscriptionSegment>;
}
export type TranslationCreateResponse = Translation | TranslationVerbose;
export interface TranslationCreateParams<ResponseFormat extends AudioAPI.AudioResponseFormat | undefined = AudioAPI.AudioResponseFormat | undefined> {
/**
* The audio file object (not file name) translate, in one of these formats: flac,
* mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
*/
file: Core.Uploadable;
/**
* ID of the model to use. Only `whisper-1` (which is powered by our open source
* Whisper V2 model) is currently available.
*/
model: (string & {}) | AudioAPI.AudioModel;
/**
* An optional text to guide the model's style or continue a previous audio
* segment. The
* [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
* should be in English.
*/
prompt?: string;
/**
* The format of the output, in one of these options: `json`, `text`, `srt`,
* `verbose_json`, or `vtt`.
*/
response_format?: 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt';
/**
* The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
* output more random, while lower values like 0.2 will make it more focused and
* deterministic. If set to 0, the model will use
* [log probability](https://en.wikipedia.org/wiki/Log_probability) to
* automatically increase the temperature until certain thresholds are hit.
*/
temperature?: number;
}
export declare namespace Translations {
export { type Translation as Translation, type TranslationVerbose as TranslationVerbose, type TranslationCreateResponse as TranslationCreateResponse, type TranslationCreateParams as TranslationCreateParams, };
}
//# sourceMappingURL=translations.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../src/resources/audio/translations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,iBAAiB,MAAM,kBAAkB,CAAC;AAEtD,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,MAAM,CACJ,IAAI,EAAE,uBAAuB,CAAC,MAAM,GAAG,SAAS,CAAC,EACjD,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;IAC/B,MAAM,CACJ,IAAI,EAAE,uBAAuB,CAAC,cAAc,CAAC,EAC7C,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IACtC,MAAM,CACJ,IAAI,EAAE,uBAAuB,CAAC,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC,EACrD,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAC1B,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;CAUnG;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;CAC1D;AAED,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,kBAAkB,CAAC;AAEzE,MAAM,WAAW,uBAAuB,CACtC,cAAc,SAAS,QAAQ,CAAC,mBAAmB,GAAG,SAAS,GAAG,QAAQ,CAAC,mBAAmB,GAAG,SAAS;IAE1G;;;OAGG;IACH,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC;IAEtB;;;OAGG;IACH,KAAK,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC;IAE3C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,cAAc,GAAG,KAAK,CAAC;IAEnE;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 57852a56412d14f57ac1eb80b9ee030f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/translations.d.ts.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 16b7da1bde7b6434e882da22ff1c92cc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/translations.d.ts
uploadId: 920982
@@ -0,0 +1,36 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Translations = void 0;
const resource_1 = require("../../resource.js");
const Core = __importStar(require("../../core.js"));
class Translations extends resource_1.APIResource {
create(body, options) {
return this._client.post('/audio/translations', Core.multipartFormRequestOptions({ body, ...options, __metadata: { model: body.model } }));
}
}
exports.Translations = Translations;
//# sourceMappingURL=translations.js.map
@@ -0,0 +1 @@
{"version":3,"file":"translations.js","sourceRoot":"","sources":["../../src/resources/audio/translations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,oDAAmC;AAInC,MAAa,YAAa,SAAQ,sBAAW;IAyB3C,MAAM,CACJ,IAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,qBAAqB,EACrB,IAAI,CAAC,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAC1F,CAAC;IACJ,CAAC;CACF;AAlCD,oCAkCC"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: d59869c73d0364d18ac37198d583fe0d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/translations.js.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 7bb7cb4eebc224951b2d46932ad1512a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/translations.js
uploadId: 920982
@@ -0,0 +1,9 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../resource.mjs";
import * as Core from "../../core.mjs";
export class Translations extends APIResource {
create(body, options) {
return this._client.post('/audio/translations', Core.multipartFormRequestOptions({ body, ...options, __metadata: { model: body.model } }));
}
}
//# sourceMappingURL=translations.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"translations.mjs","sourceRoot":"","sources":["../../src/resources/audio/translations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,IAAI;AAIhB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAyB3C,MAAM,CACJ,IAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,qBAAqB,EACrB,IAAI,CAAC,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAC1F,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 0ae2714f1288a4920b2c57659af51653
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/translations.mjs.map
uploadId: 920982
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: d10948866d3294e7e81397cf9f1471b3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 336030
packageName: Synaptic AI Pro - Natural Language Control for Unity
packageVersion: 1.2.23
assetPath: Assets/Synaptic AI Pro/MCPServer/node_modules/openai/resources/audio/translations.mjs
uploadId: 920982