import { RimeTTS } from "getpatter";
// Arcana — highest quality, up to 4-minute request timeout.
const tts = new RimeTTS(process.env.RIME_API_KEY!, {
model: "arcana",
speaker: "astra",
lang: "eng",
sampleRate: 16000,
});
// Mist v2 — low-latency, streaming-friendly.
const fast = new RimeTTS(process.env.RIME_API_KEY!, {
model: "mistv2",
speaker: "cove",
speedAlpha: 1.1,
reduceLatency: true,
});
for await (const chunk of tts.synthesizeStream("Ciao dal Patter pipeline.")) {
// chunk is a Buffer of PCM_S16LE audio
}