is_en (en/mod.rs)

kesha-voice-kit · rust/src/tts/en/mod.rs · rust · MIT
voice, Voice / Speech

! English-specific text normalization for the Kokoro path. ! ! Two tables: `letter_table::expand_chars` (letter-spelling) and ! `acronym::IPA_LEXICON` / `acronym::STOP_LIST` (IPA overrides / pass-throughs). ! ! Closes #244.

// Source: https://github.com/drakulavich/kesha-voice-kit | License: MIT | Copyright 2026 drakulavich
// Provided via justclaw.it.com; keep this notice with the code.
//! English-specific text normalization for the Kokoro path.
//!
//! Two tables: `letter_table::expand_chars` (letter-spelling) and
//! `acronym::IPA_LEXICON` / `acronym::STOP_LIST` (IPA overrides / pass-throughs).
//!
//! Closes #244.

pub(super) mod acronym;
pub(super) mod letter_table;
pub mod numbers;

use crate::tts::ssml::Segment;

/// True for any English variant (`en`, `en-us`, `en-gb`, …).
/// Centralized so all call sites (plain/SSML/stdin-loop) agree on the gate.
pub fn is_en(lang: &str) -> bool {
    lang.starts_with("en")
}

/// The pronunciation overrides the ANE path installs, as `(word, IPA)` pairs.
///
/// [`

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

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

Get a free API key