7ffa7ae3f2
Build a first-version SFCustomLanguageModelData for on-device ASR customization, generated offline on macOS (no app code dependency). - Scripts/lexicon: Python builders for Sogou-derived phrases (scel + SogouPopularDict) and a curated bilingual AI/tech/brand seed lexicon - export_clm.swift / prepare_clm.swift: macOS CLI tools that export the .bin training asset and compile it into LM + Vocab via the Speech framework - Resources/CustomLanguageModel: generated phrases.tsv, manifests, the 129k-phrase .bin, and compiled LM/Vocab assets (zh_CN) - .gitignore: ignore lexicon build cache and Python bytecode Note: Sogou-derived data is for internal experimentation only; the curated AI/tech seed is MIT and safe to ship.
10 lines
285 B
Bash
Executable File
10 lines
285 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Full offline CLM pipeline on macOS:
|
|
# 1) export .bin from TSVs
|
|
# 2) prepare compiled LM + Vocab
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
cd "$ROOT"
|
|
"$ROOT/Scripts/lexicon/build-clm-bin.sh" "$@"
|
|
"$ROOT/Scripts/lexicon/prepare-clm.sh" "$@"
|