Skip to main content

Rime TTS

RimeTTS targets the Rime HTTP endpoint. Both Arcana (high fidelity) and Mist (low latency) model families are supported. The provider requests audio/pcm and yields raw PCM_S16LE chunks at the configured sample rate.

Install

npm install getpatter
No vendor SDK is required — RimeTTS uses the platform fetch, so it works on Node 18+.

Usage

import { RimeTTS } from "getpatter";

const tts = new RimeTTS();                                            // reads RIME_API_KEY
const tts2 = new RimeTTS({ model: "arcana", speaker: "astra" });
In an agent:
// npx tsx example.ts
import { Patter, Twilio, DeepgramSTT, RimeTTS } from "getpatter";

const phone = new Patter({ carrier: new Twilio(), phoneNumber: "+15550001234" });

const agent = phone.agent({
  stt: new DeepgramSTT(),                             // DEEPGRAM_API_KEY from env
  tts: new RimeTTS({ model: "arcana", speaker: "astra" }),  // RIME_API_KEY from env
  systemPrompt: "You are a helpful assistant.",
});

await phone.serve({ agent });
Mist v2 — low-latency, streaming-friendly:
const fast = new RimeTTS({
  model: "mistv2",
  speaker: "cove",
  speedAlpha: 1.1,
  reduceLatency: true,
});

Options (selection)

OptionDefaultNotes
apiKeyReads from RIME_API_KEY when omitted.
model"arcana""arcana" or any mist* model.
speaker"astra" / "cove"Default depends on model.
lang"eng"Rime language code.
sampleRate16000Hz.
temperature, topP, maxTokens, repetitionPenaltyArcana only.
speedAlpha, reduceLatency, pauseBetweenBrackets, phonemizeBetweenBracketsMist only.
baseUrlRime /v1/rime-ttsOverride for proxying or self-hosted gateways.