voxxy

Reference v0.1.2

voxxy/tts/paradee

Paradee speech synthesis, running in its own worker. English.

import { … } from "voxxy/tts/paradee"

Functions

paradeeFiles function

function paradeeFiles(
  options?: Pick<ParadeeOptions, "baseUrl" | "lexiconBaseUrl" | "g2pBaseUrl" | "wasmBaseUrl">
): {
    files: ModelFile[];
    urls: Omit<ParadeeAdapterOptions, "voice" | "speed">;
  }

The files this provider needs, as the model manager will download and check them.

paradeeTts function

function paradeeTts(__namedParameters: ParadeeOptions): TtsProvider

Text-to-speech with Paradee 8M v1.3 (English voices, Apache-2.0), on onnxruntime-web in its own worker, one thread: no COOP/COEP needed. The phonemiser is a JavaScript port of misaki's English G2P plus Paradee's own G2P model: no eSpeak NG, which is GPL-3.0. First use downloads about 31 MB after the user's opt-in through voxxy.models: the 8.5 MB model, 6.1 MB of dictionaries, 2.1 MB of G2P model and data, and the 14.8 MB runtime wasm.

Interfaces

ParadeeOptions interface

interface ParadeeOptions

Options for paradeeTts(). Only player is required.

player: Player

Plays the audio: createWebAudioPlayer() in a page.

voice?: "af_heart" | "am_puck"

American English voices: af_heart (default, female) or am_puck (male).

speed?: number

1 is normal; above 1 is faster.

splitSentences?: boolean

Run every sentence of a chunk as a separate utterance. Default false: the chunk goes through the model whole, which gives natural pauses of 0.15 to 0.35 s; separate utterances each carry the model's own padding, 0.65 to 0.7 s apart. (A chunk longer than the model's limit of 510 phonemes is cut at a space either way.)

baseUrl?: string

Serve the model yourself: the folder that holds onnx/paradee_int8.onnx and config.json. Default: Hugging Face, pinned to a commit.

lexiconBaseUrl?: string

The folder that holds misaki's us_gold.json and us_silver.json. Default: GitHub raw, pinned to a commit.

g2pBaseUrl?: string

The folder that holds Paradee's g2p.onnx and g2p.json.gz. Default: GitHub raw, pinned to a commit.

wasmBaseUrl?: string

The folder that holds ort-wasm-simd-threaded.wasm. Default: jsDelivr, pinned to the version.

maxAhead?: number

How many texts may be synthesised ahead of the one playing. Default 1.

splitter?: SplitterOptions

How speak() cuts text into chunks. Every chunk is one model run and starts with about 0.3 s of quiet, so packing several sentences per chunk ({ firstMinChars: 30, minChars: 120 }) means fewer of those and a more natural flow, at the price of a longer wait for the first chunk if firstMinChars is large.

onChunk?: (info: ChunkInfo) => void

Called for every chunk once it is synthesised.

workerUrl?: string | URL

The URL of the worker script, for bundlers that cannot find it on their own. Default: the one shipped next to this module.