-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathaudio.ts
78 lines (69 loc) · 2.92 KB
/
audio.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import * as SpeechAPI from './speech';
import { Speech, SpeechCreateParams, SpeechModel } from './speech';
import * as TranscriptionsAPI from './transcriptions';
import {
Transcription,
TranscriptionCreateParams,
TranscriptionCreateParamsNonStreaming,
TranscriptionCreateParamsStreaming,
TranscriptionCreateResponse,
TranscriptionInclude,
TranscriptionSegment,
TranscriptionStreamEvent,
TranscriptionTextDeltaEvent,
TranscriptionTextDoneEvent,
TranscriptionVerbose,
TranscriptionWord,
Transcriptions,
} from './transcriptions';
import * as TranslationsAPI from './translations';
import {
Translation,
TranslationCreateParams,
TranslationCreateResponse,
TranslationVerbose,
Translations,
} from './translations';
export class Audio extends APIResource {
transcriptions: TranscriptionsAPI.Transcriptions = new TranscriptionsAPI.Transcriptions(this._client);
translations: TranslationsAPI.Translations = new TranslationsAPI.Translations(this._client);
speech: SpeechAPI.Speech = new SpeechAPI.Speech(this._client);
}
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';
Audio.Transcriptions = Transcriptions;
Audio.Translations = Translations;
Audio.Speech = Speech;
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 };
}