import type { PredictorService, PredictionService } from "../../services"; import type { Acceleration } from "../../types"; export type SpeechResponseFormat = "aac" | "flac" | "mp3" | "opus" | "pcm" | "wav"; export type SpeechStreamFormat = "audio" | "sse"; export interface SpeechCreateParams { /** * The text to generate audio for. */ input: string; /** * Speech generation predictor tag. */ model: string; /** * The voice to use when generating the audio. */ voice: string; /** * The format to return audio in. */ response_format?: SpeechResponseFormat; /** * The speed of the generated audio. * Defaults to 1.0. */ speed?: number; /** * The format to stream the audio in. */ stream_format?: SpeechStreamFormat; /** * Prediction acceleration. */ acceleration?: Acceleration; } export declare class SpeechService { private readonly predictors; private readonly predictions; private readonly cache; constructor(predictors: PredictorService, predictions: PredictionService); create({ model: tag, input, voice, response_format, speed, stream_format, acceleration }: SpeechCreateParams): Promise; private createDelegate; }