UNPKG

echogarden

Version:

An easy-to-use speech toolset. Includes tools for synthesis, recognition, alignment, speech translation, language detection, source separation and more.

20 lines (19 loc) 829 B
export declare function synthesize(text: string, apiKey: string, languageCode?: string, voice?: string, speakingRate?: number, pitchDeltaSemitones?: number, volumeGainDecibels?: number, ssml?: boolean, audioEncoding?: AudioEncoding, sampleRate?: number): Promise<{ rawAudio: { audioChannels: Float32Array<ArrayBufferLike>[]; sampleRate: number; }; timepoints: timePoint[]; }>; export declare function getVoiceList(apiKey: string): Promise<GoogleCloudVoice[]>; export type GoogleCloudVoice = { name: string; languageCodes: string[]; ssmlGender: 'MALE' | 'FEMALE'; naturalSampleRateHertz: number; }; export type AudioEncoding = 'AUDIO_ENCODING_UNSPECIFIED' | 'LINEAR16' | 'MP3' | 'OGG_OPUS' | 'MULAW' | 'ALAW'; export type timePoint = { markName: string; timeSeconds: number; };