// @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
// @generated from file api/v1/ai_service.proto (package memos.api.v1, syntax proto3)
/* eslint-disable */

import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import { file_google_api_annotations } from "../../google/api/annotations_pb";
import { file_google_api_client } from "../../google/api/client_pb";
import { file_google_api_field_behavior } from "../../google/api/field_behavior_pb";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file api/v1/ai_service.proto.
 */
export const file_api_v1_ai_service: GenFile = /*@__PURE__*/
  fileDesc("ChdhcGkvdjEvYWlfc2VydmljZS5wcm90bxIMbWVtb3MuYXBpLnYxIpsBChFUcmFuc2NyaWJlUmVxdWVzdBIYCgtwcm92aWRlcl9pZBgBIAEoCUID4EECEjYKBmNvbmZpZxgCIAEoCzIhLm1lbW9zLmFwaS52MS5UcmFuc2NyaXB0aW9uQ29uZmlnQgPgQQISNAoFYXVkaW8YAyABKAsyIC5tZW1vcy5hcGkudjEuVHJhbnNjcmlwdGlvbkF1ZGlvQgPgQQIiVQoTVHJhbnNjcmlwdGlvbkNvbmZpZxISCgVtb2RlbBgBIAEoCUID4EEBEhMKBnByb21wdBgCIAEoCUID4EEBEhUKCGxhbmd1YWdlGAMgASgJQgPgQQEidwoSVHJhbnNjcmlwdGlvbkF1ZGlvEhYKB2NvbnRlbnQYASABKAxCA+BBBEgAEg0KA3VyaRgCIAEoCUgAEhUKCGZpbGVuYW1lGAMgASgJQgPgQQESGQoMY29udGVudF90eXBlGAQgASgJQgPgQQFCCAoGc291cmNlIiIKElRyYW5zY3JpYmVSZXNwb25zZRIMCgR0ZXh0GAEgASgJMpoBCglBSVNlcnZpY2USjAEKClRyYW5zY3JpYmUSHy5tZW1vcy5hcGkudjEuVHJhbnNjcmliZVJlcXVlc3QaIC5tZW1vcy5hcGkudjEuVHJhbnNjcmliZVJlc3BvbnNlIjvaQRhwcm92aWRlcl9pZCxjb25maWcsYXVkaW+C0+STAho6ASoiFS9hcGkvdjEvYWk6dHJhbnNjcmliZUKmAQoQY29tLm1lbW9zLmFwaS52MUIOQWlTZXJ2aWNlUHJvdG9QAVowZ2l0aHViLmNvbS91c2VtZW1vcy9tZW1vcy9wcm90by9nZW4vYXBpL3YxO2FwaXYxogIDTUFYqgIMTWVtb3MuQXBpLlYxygIMTWVtb3NcQXBpXFYx4gIYTWVtb3NcQXBpXFYxXEdQQk1ldGFkYXRh6gIOTWVtb3M6OkFwaTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior]);

/**
 * @generated from message memos.api.v1.TranscribeRequest
 */
export type TranscribeRequest = Message<"memos.api.v1.TranscribeRequest"> & {
  /**
   * Required. The instance AI provider ID to use.
   *
   * @generated from field: string provider_id = 1;
   */
  providerId: string;

  /**
   * Required. Transcription options.
   *
   * @generated from field: memos.api.v1.TranscriptionConfig config = 2;
   */
  config?: TranscriptionConfig;

  /**
   * Required. Audio input.
   *
   * @generated from field: memos.api.v1.TranscriptionAudio audio = 3;
   */
  audio?: TranscriptionAudio;
};

/**
 * Describes the message memos.api.v1.TranscribeRequest.
 * Use `create(TranscribeRequestSchema)` to create a new message.
 */
export const TranscribeRequestSchema: GenMessage<TranscribeRequest> = /*@__PURE__*/
  messageDesc(file_api_v1_ai_service, 0);

/**
 * @generated from message memos.api.v1.TranscriptionConfig
 */
export type TranscriptionConfig = Message<"memos.api.v1.TranscriptionConfig"> & {
  /**
   * Optional. The model to use. If empty, the provider's default model is used.
   *
   * @generated from field: string model = 1;
   */
  model: string;

  /**
   * Optional. A prompt to improve transcription quality.
   *
   * @generated from field: string prompt = 2;
   */
  prompt: string;

  /**
   * Optional. The language of the input audio.
   *
   * @generated from field: string language = 3;
   */
  language: string;
};

/**
 * Describes the message memos.api.v1.TranscriptionConfig.
 * Use `create(TranscriptionConfigSchema)` to create a new message.
 */
export const TranscriptionConfigSchema: GenMessage<TranscriptionConfig> = /*@__PURE__*/
  messageDesc(file_api_v1_ai_service, 1);

/**
 * @generated from message memos.api.v1.TranscriptionAudio
 */
export type TranscriptionAudio = Message<"memos.api.v1.TranscriptionAudio"> & {
  /**
   * @generated from oneof memos.api.v1.TranscriptionAudio.source
   */
  source: {
    /**
     * Inline audio bytes.
     *
     * @generated from field: bytes content = 1;
     */
    value: Uint8Array;
    case: "content";
  } | {
    /**
     * URI for audio content. Reserved for future use.
     *
     * @generated from field: string uri = 2;
     */
    value: string;
    case: "uri";
  } | { case: undefined; value?: undefined };

  /**
   * Optional. The uploaded filename.
   *
   * @generated from field: string filename = 3;
   */
  filename: string;

  /**
   * Optional. The MIME type of the input audio.
   *
   * @generated from field: string content_type = 4;
   */
  contentType: string;
};

/**
 * Describes the message memos.api.v1.TranscriptionAudio.
 * Use `create(TranscriptionAudioSchema)` to create a new message.
 */
export const TranscriptionAudioSchema: GenMessage<TranscriptionAudio> = /*@__PURE__*/
  messageDesc(file_api_v1_ai_service, 2);

/**
 * @generated from message memos.api.v1.TranscribeResponse
 */
export type TranscribeResponse = Message<"memos.api.v1.TranscribeResponse"> & {
  /**
   * The transcribed text.
   *
   * @generated from field: string text = 1;
   */
  text: string;
};

/**
 * Describes the message memos.api.v1.TranscribeResponse.
 * Use `create(TranscribeResponseSchema)` to create a new message.
 */
export const TranscribeResponseSchema: GenMessage<TranscribeResponse> = /*@__PURE__*/
  messageDesc(file_api_v1_ai_service, 3);

/**
 * @generated from service memos.api.v1.AIService
 */
export const AIService: GenService<{
  /**
   * Transcribe transcribes an audio file using an instance AI provider.
   *
   * @generated from rpc memos.api.v1.AIService.Transcribe
   */
  transcribe: {
    methodKind: "unary";
    input: typeof TranscribeRequestSchema;
    output: typeof TranscribeResponseSchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_api_v1_ai_service, 0);

