@squidcloud/client
Version:
A typescript implementation of the Squid client
26 lines (25 loc) • 1.1 kB
TypeScript
import { AiAudioCreateSpeechOptions, AiAudioTranscribeOptions } from './public-types';
/**
* AiAudioClient provides methods for AI-driven audio processing,
* including speech transcription and text-to-speech synthesis.
* @category AI
*/
export declare class AiAudioClient {
private readonly rpcManager;
/**
* Transcribes the spoken content of an audio file into text.
*
* @param file - The audio file to transcribe.
* @param options - Options specifying the transcription model and behavior.
* @returns A Promise that resolves to the transcribed text.
*/
transcribe(file: File, options?: AiAudioTranscribeOptions): Promise<string>;
/**
* Converts a text input into a spoken audio file using AI-generated speech.
*
* @param input - The text to convert to speech.
* @param options - Options for customizing speech synthesis (e.g., voice, speed).
* @returns A Promise that resolves to an audio File containing the synthesized speech.
*/
createSpeech(input: string, options: AiAudioCreateSpeechOptions): Promise<File>;
}