import { MutationKey, UseMutationResult } from "@tanstack/react-query"; import { SDKCore } from "../core.js"; import { RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { MutationHookOptions } from "./_types.js"; export type LlmSpeechTranscribeMutationVariables = { request: operations.TranscribeRequest; options?: RequestOptions; }; export type LlmSpeechTranscribeMutationData = components.TranscriptionResponse; export type LlmSpeechTranscribeMutationError = SDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * Speech to text transcription * * @remarks * Convert audio to text using advanced speech recognition. * * **Complete File Upload (Standard)** * Use `Content-Type: multipart/form-data` to upload the complete audio file in one request. Maximum file size: 25MB. * * Example: * ```bash * curl -X POST "http://localhost:3000/api/v1/llm/speech/transcriptions?language=en" \ * -F "file=@audio.flac" * ``` * * **Chunked Upload (Streaming)** * Use `Transfer-Encoding: chunked` header to stream audio data in chunks as it's being recorded. No need to know total file size upfront. Server buffers chunks until complete before processing. Maximum total size: 25MB. * * Example: * ```bash * curl -X POST "http://localhost:3000/api/v1/llm/speech/transcriptions?language=en" \ * -H "Transfer-Encoding: chunked" \ * -H "Content-Type: multipart/form-data" \ * --data-binary @audio.flac * ``` * * **Supported Formats:** FLAC, MP3, MP4, MPEG, MPGA, M4A, OGG, WAV, WebM * * **Query Parameters:** * - `model` (optional): Transcription model identifier. Defaults to 'auto'. * - `language` (optional): ISO-639-1 or BCP-47 language code (e.g., "en", "en-US"). Auto-detects if not specified. * - `prompt` (optional): Legacy prompt parameter retained for backward compatibility. * - `temperature` (optional): Legacy temperature parameter retained for backward compatibility. * - `include_speaker_data` (optional): When `true`, include speaker diarization data and require WAV/PCM input. Otherwise transcription uses the standard compatibility path. * * **Response:** Returns transcribed text in JSON format. */ export declare function useLlmSpeechTranscribeMutation(options?: MutationHookOptions): UseMutationResult; export declare function mutationKeyLlmSpeechTranscribe(): MutationKey; export declare function buildLlmSpeechTranscribeMutation(client$: SDKCore, hookOptions?: RequestOptions): { mutationKey: MutationKey; mutationFn: (variables: LlmSpeechTranscribeMutationVariables) => Promise; }; //# sourceMappingURL=llmSpeechTranscribe.d.ts.map