web-ai-toolkit
Version:
AI powered features on the web made easy
22 lines (21 loc) • 495 B
JavaScript
import { _ as n, a as i } from "./transformers-kV3s9sef.js";
let t;
async function l(s, e = "Xenova/mms-tts-eng") {
return new Promise(async (o, r) => {
try {
t || await c(e);
const a = await t(s);
o(a);
} catch (a) {
r(a);
}
});
}
async function c(s) {
return new Promise(async (e) => {
t || (n.allowLocalModels = !1, n.useBrowserCache = !1, t = await i("text-to-speech", s || "Xenova/mms-tts-eng")), e();
});
}
export {
l as runSynthesizer
};