Chemistry Speech Transformer (src/index.ts)

airi · packages/speech-transformer-chem/src/index.ts · typescript · MIT
voice, ai, ui, lang:typescript, tag:chemistry

Exports functions to lower‑case and verbalize chemical expressions with multilingual locale support, enabling speech synthesis for chemistry content.

// 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.
import type { MathSpeechExtension } from '@proj-airi/speech-transformer-math'

import type { ChemLocale } from './locale'

import { lowerChemistry, speakChemistry } from './chem'
import { en } from './locales/en'
import { ja } from './locales/ja'
import { ko } from './locales/ko'
import { zh } from './locales/zh'

export { lowerChemistry, speakChemistry } from './chem'
export type { ChemLocale, ChemSpecies } from './locale'
// Named apart from the math packs, so one file can import both.
export { en as enChem, ja as jaChem, ko as koChem, zh as zhChem }

/** The built-in chemistry locales: Chinese, English, Japanese, and Korean. */
e

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

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

Get a free API key