-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathaudio.ts
More file actions
80 lines (66 loc) · 2.48 KB
/
audio.ts
File metadata and controls
80 lines (66 loc) · 2.48 KB
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
79
80
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import * as AudioAPI from './audio';
import * as SpeechAPI from './speech';
import {
Speech,
SpeechCreateParams,
SpeechCreateParamsNonStreaming,
SpeechCreateParamsStreaming,
} from './speech';
import * as TranscriptionsAPI from './transcriptions';
import { TranscriptionCreateParams, TranscriptionCreateResponse, Transcriptions } from './transcriptions';
import * as TranslationsAPI from './translations';
import { TranslationCreateParams, TranslationCreateResponse, Translations } from './translations';
import * as VoicesAPI from './voices';
import { VoiceListResponse, Voices } from './voices';
export class Audio extends APIResource {
speech: SpeechAPI.Speech = new SpeechAPI.Speech(this._client);
voices: VoicesAPI.Voices = new VoicesAPI.Voices(this._client);
transcriptions: TranscriptionsAPI.Transcriptions = new TranscriptionsAPI.Transcriptions(this._client);
translations: TranslationsAPI.Translations = new TranslationsAPI.Translations(this._client);
}
export type AudioFile = AudioFile.AudioSpeechStreamEvent | AudioFile.StreamSentinel;
export namespace AudioFile {
export interface AudioSpeechStreamEvent {
data: AudioAPI.AudioSpeechStreamChunk;
}
export interface StreamSentinel {
data: '[DONE]';
}
}
export interface AudioSpeechStreamChunk {
/**
* base64 encoded audio stream
*/
b64: string;
model: string;
/**
* The object type, which is always `audio.tts.chunk`.
*/
object: 'audio.tts.chunk';
}
Audio.Speech = Speech;
Audio.Voices = Voices;
Audio.Transcriptions = Transcriptions;
Audio.Translations = Translations;
export declare namespace Audio {
export { type AudioFile as AudioFile, type AudioSpeechStreamChunk as AudioSpeechStreamChunk };
export {
Speech as Speech,
type SpeechCreateParams as SpeechCreateParams,
type SpeechCreateParamsNonStreaming as SpeechCreateParamsNonStreaming,
type SpeechCreateParamsStreaming as SpeechCreateParamsStreaming,
};
export { Voices as Voices, type VoiceListResponse as VoiceListResponse };
export {
Transcriptions as Transcriptions,
type TranscriptionCreateResponse as TranscriptionCreateResponse,
type TranscriptionCreateParams as TranscriptionCreateParams,
};
export {
Translations as Translations,
type TranslationCreateResponse as TranslationCreateResponse,
type TranslationCreateParams as TranslationCreateParams,
};
}