async_openai/audio/
audio_.rs1use crate::{config::Config, Client, RequestOptions};
2
3use super::{Speech, Transcriptions, Translations, VoiceConsents, Voices};
4
5pub struct Audio<'c, C: Config> {
8 client: &'c Client<C>,
9 pub(crate) request_options: RequestOptions,
10}
11
12impl<'c, C: Config> Audio<'c, C> {
13 pub fn new(client: &'c Client<C>) -> Self {
14 Self {
15 client,
16 request_options: RequestOptions::new(),
17 }
18 }
19
20 pub fn speech(&self) -> Speech<'_, C> {
22 Speech::new(self.client)
23 }
24
25 pub fn transcription(&self) -> Transcriptions<'_, C> {
27 Transcriptions::new(self.client)
28 }
29
30 pub fn translation(&self) -> Translations<'_, C> {
32 Translations::new(self.client)
33 }
34
35 pub fn voice_consents(&self) -> VoiceConsents<'_, C> {
37 VoiceConsents::new(self.client)
38 }
39
40 pub fn voices(&self) -> Voices<'_, C> {
42 Voices::new(self.client)
43 }
44}