Automatic Speech Recognition
PyTorch
Safetensors
GGUF
MLX
Tamil
English
speech
asr
streaming
rnnt
ctc
tamil
tanglish
code-switching
indian-english
verisafe
Instructions to use junafinity/VeriSafe-Tanglish-1-STT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use junafinity/VeriSafe-Tanglish-1-STT with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download junafinity/VeriSafe-Tanglish-1-STT --local-dir VeriSafe-Tanglish-1-STT
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download code/export/make_manifest.py from junafinity/VeriSafe-Tanglish-1-STT: direct link, hf CLI and curl.
- Browser
- Download file 2.35 kB
-
https://huggingface.co/junafinity/VeriSafe-Tanglish-1-STT/resolve/main/code/export/make_manifest.py
- Command line
-
hf download hf://junafinity/VeriSafe-Tanglish-1-STT/code/export/make_manifest.py
-
curl -L -o make_manifest.py https://huggingface.co/junafinity/VeriSafe-Tanglish-1-STT/resolve/main/code/export/make_manifest.py
2.35 kB
| """MANIFEST.sha256 of the package: one line per file, "<sha256> <size in bytes> <path relative to the package>". Standard library only. | |
| python make_manifest.py write PACKAGE_DIR | |
| python make_manifest.py verify PACKAGE_DIR (exit 1 on any missing, extra or changed file) | |
| __pycache__ folders are not listed: Python rewrites them. | |
| """ | |
| import hashlib | |
| import os | |
| import sys | |
| from pathlib import Path | |
| NAME = "MANIFEST.sha256" | |
| HEADER = "# sha256 size_bytes path, every file of this folder except this one and __pycache__\n" | |
| def files(root: Path) -> list[Path]: | |
| out = [] | |
| for d, sub, names in os.walk(root): | |
| sub[:] = sorted(s for s in sub if s != "__pycache__") | |
| for n in sorted(names): | |
| p = Path(d) / n | |
| if p != root / NAME: | |
| out.append(p) | |
| return out | |
| def sha256(p: Path) -> str: | |
| h = hashlib.sha256() | |
| with open(p, "rb") as f: | |
| while b := f.read(1 << 24): | |
| h.update(b) | |
| return h.hexdigest() | |
| def write(root: Path) -> None: | |
| lines, total = [], 0 | |
| for p in files(root): | |
| size = p.stat().st_size | |
| total += size | |
| lines.append(f"{sha256(p)} {size} {p.relative_to(root).as_posix()}\n") | |
| (root / NAME).write_text(HEADER + "".join(lines), encoding="utf-8", newline="\n") | |
| print(f"{len(lines)} files, {total} bytes ({total / 2**30:.2f} GiB)") | |
| def verify(root: Path) -> None: | |
| want = {} | |
| for line in (root / NAME).read_text(encoding="utf-8").splitlines(): | |
| if line and not line.startswith("#"): | |
| sha, size, rel = line.split(" ", 2) | |
| want[rel] = (sha, int(size)) | |
| have = {p.relative_to(root).as_posix(): p for p in files(root)} | |
| missing, extra = sorted(set(want) - set(have)), sorted(set(have) - set(want)) | |
| changed = [r for r in sorted(set(want) & set(have)) | |
| if have[r].stat().st_size != want[r][1] or sha256(have[r]) != want[r][0]] | |
| print(f"{len(want)} listed, {len(have)} on disk; missing {len(missing)}, extra {len(extra)}, changed {len(changed)}") | |
| for label, group in [("missing", missing), ("extra", extra), ("changed", changed)]: | |
| for r in group: | |
| print(f" {label}: {r}") | |
| sys.exit(1 if missing or extra or changed else 0) | |
| if __name__ == "__main__": | |
| {"write": write, "verify": verify}[sys.argv[1]](Path(sys.argv[2])) | |