UNPKG

kitten-tts-webgpu

Version:

Run Kitten TTS (80M) locally in the browser via WebGPU. One function call: textToSpeech('Hello!') → WAV blob.

25 lines (24 loc) 774 B
/** * Simplified port of espeak-ng's English letter-to-phoneme rules. * * Parses the en_rules file format and applies rules to convert * unknown English words to IPA phonemes. */ /** * Convert espeak internal phoneme string to IPA. */ export declare function espeakToIPA(espeak: string): string; /** * Parse the en_rules file and populate RULE_GROUPS and LETTER_GROUPS. */ export declare function parseRules(rulesText: string): void; /** * Convert a word to IPA using the rule engine. */ export declare function wordToIPA(word: string): string; /** * Initialize the rule engine with the rules text. * Call this once with the contents of en_rules. */ export declare function initRules(rulesText: string): void; export declare function isRulesLoaded(): boolean;