// Pronunciation clip for a word or sentence: /audio/.mp3, made from the exact text by scripts/make-audio.mjs export function audioSlug(text: string): string { return text .toLowerCase() .normalize("NFKD") .replace(/[̀-ͯ]/g, "") .replace(/[^a-z0-9]+/g, "-") .replace(/^-+|-+$/g, "") .slice(0, 80) .replace(/-+$/g, ""); } export function audioFileFor(text: string): string { return `/audio/${audioSlug(text)}.mp3`; }