/**
 * OpenAI Node - Version 2.3
 * Discriminator: resource=audio, operation=generate
 */


interface Credentials {
  openAiApi: CredentialReference;
}

/** Creates audio from a text prompt */
export type LcOpenAiV23AudioGenerateParams = {
  resource: 'audio';
  operation: 'generate';
/**
 * Model
 * @default tts-1
 */
    model?: 'tts-1' | 'tts-1-hd' | Expression<string>;
/**
 * The text to generate audio for. The maximum length is 4096 characters.
 */
    input?: string | Expression<string>;
/**
 * The voice to use when generating the audio
 * @default alloy
 */
    voice?: 'alloy' | 'echo' | 'fable' | 'nova' | 'onyx' | 'shimmer' | Expression<string>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** Response Format
     * @default mp3
     */
    response_format?: 'mp3' | 'opus' | 'aac' | 'flac' | Expression<string>;
    /** Audio Speed
     * @default 1
     */
    speed?: number | Expression<number>;
    /** Put Output in Field
     * @hint The name of the output field to put the binary file data in
     * @default data
     */
    binaryPropertyOutput?: string | Expression<string>;
  };
};

export interface LcOpenAiV23AudioGenerateSubnodeConfig {
  tools?: ToolInstance[];
  memory?: MemoryInstance;
}

export type LcOpenAiV23AudioGenerateNode = {
  type: '@n8n/n8n-nodes-langchain.openAi';
  version: 2.3;
  credentials?: Credentials;
  isTrigger: true;
  config: NodeConfig<LcOpenAiV23AudioGenerateParams> & { subnodes?: LcOpenAiV23AudioGenerateSubnodeConfig };
};