lingva-scraper-update
Version:
Google Translate scraper for Lingva Translate
10 lines (9 loc) • 571 B
TypeScript
import { LangCode } from "./utils/language";
/**
* Retrieves an audio buffer of the given text in the given language
* @param lang - The code of the language to be used as the TTS voice or "auto" for automatic detection
* @param text - The text to be converted into speech
* @param [isSlow=false] - Whether the audio should be slowed down or not
* @returns An array of numbers that represents a {@link Uint8Array} of the audio buffer
*/
export declare const getAudio: (lang: LangCode<"target"> | "auto", text: string, isSlow?: boolean) => Promise<number[] | null>;