Files
christianandClaude Opus 5 c9eef0672c Church Translate, as it runs at the campuses
Live sermon translation into 100+ languages, running entirely on one Mac per
campus: audio in, voice detection, Whisper on the GPU, NLLB-200 in its own
process, and a built-in web server the congregation reads from on their
phones. No audio leaves the building.

This is the source only. What used to sit beside it — 14 GB of speech and
translation models, 8 GB of voice bundles, 6 GB of natural voices, the Electron
caches, and the app data holding the operator PIN and every service transcript
— is machine state and downloaded assets, and stays in the NAS backup where it
belongs. The vendored node, cloudflared and Windows ffmpeg binaries are out too
(533 MB, re-fetched for packaging); the browser-side runtime beside them is
kept, so a checkout still serves the congregation page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 15:41:21 -04:00

35 lines
1.4 KiB
JavaScript

/*
* sidecar-langs.js — the ONE table of what the mlx-audio sidecar calls a language.
*
* Two models, two conventions: Kokoro wants a single letter ('e', 'p'), Qwen3
* wants a full word ('spanish'). Both tts-service.js (which speaks) and main.js
* (which now WARMS the exact voices in use at launch) need the same answer, and
* a copy in each drifted once already — which is how the warmup came to load a
* 1.7 GB model nobody had chosen while the 82 MB one every pinned language
* actually used sat cold until the first sentence of the service.
*/
(function (root, factory) {
if (typeof module === 'object' && module.exports) module.exports = factory();
else root.SidecarLangs = factory();
}(typeof self !== 'undefined' ? self : this, function () {
'use strict';
const KOKORO_MODEL = 'prince-canuma/Kokoro-82M';
const QWEN_MODEL = 'mlx-community/Qwen3-TTS-12Hz-1.7B-CustomVoice-8bit';
const KOKORO_LANG = {
eng_Latn: 'a', spa_Latn: 'e', spa_ES: 'e', spa_MX: 'e',
por_Latn: 'p', por_PT: 'p', fra_Latn: 'f', ita_Latn: 'i',
hin_Deva: 'h', jpn_Jpan: 'j', zho_Hans: 'z'
};
const LOCAL_LANG = {
spa_Latn: 'spanish', por_Latn: 'portuguese', zho_Hans: 'chinese',
kor_Hang: 'korean', fra_Latn: 'french', eng_Latn: 'english',
deu_Latn: 'german', ita_Latn: 'italian', rus_Cyrl: 'russian',
por_PT: 'portuguese', spa_ES: 'spanish', spa_MX: 'spanish'
};
return { KOKORO_MODEL, QWEN_MODEL, KOKORO_LANG, LOCAL_LANG };
}));