kokoroModelsToModelInfo (kokoro/constants.ts)

airi · packages/stage-ui/src/workers/kokoro/constants.ts · typescript · MIT
voice

Centralized constants and conversion for Kokoro TTS models, supporting platform filtering.

// Source: https://github.com/moeru-ai/airi | License: MIT | Copyright 2024-PRESENT Neko Ayaka
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Kokoro TTS Constants
 * Centralized constants for Kokoro TTS to avoid duplication
 */

/**
 * Platform types for Kokoro models
 */
export type KokoroPlatform = 'webgpu' | 'wasm'

/**
 * Kokoro model definition
 */
export interface KokoroModel {
  /** Model identifier/quantization string */
  id: string
  /** Human-readable name */
  name: string
  /** Platform required to run this model */
  platform: KokoroPlatform
  /** Quantization value to pass to loadModel */
  quantization: string
  /** i18n key for model description */
  descriptionKey: string
}

/**
 * Available Kokoro models with their platform requirements
 */
expor

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key