imYChaudhary22 commited on
Commit
de38689
路
verified 路
1 Parent(s): e0fb867

Match the BuilderHelm model card format for Indic-Transcribe Flex

Browse files
Files changed (1) hide show
  1. README.md +93 -17
README.md CHANGED
@@ -5,39 +5,115 @@ license_link: LICENSE.md
5
  base_model: bodhan-ai/indic-transcribe-flex
6
  pipeline_tag: automatic-speech-recognition
7
  language: [as, bgc, bhb, bho, bn, brx, doi, en, gu, hi, hne, kn, kok, ks, mai, ml, mni, mr, ne, or, pa, sa, sat, sd, ta, te, ur]
8
- tags: [coreml, apple-silicon, on-device, indic, speech-to-text]
9
  inference: false
10
  ---
 
11
 
12
- # Indic-Transcribe Flex for Core ML
 
 
 
13
 
14
- <img src="icon.png" alt="Indic-Transcribe Flex icon" width="96">
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  Built with Indic-Transcribe Flex from Bodhan AI / AI4Bharat.
17
 
18
- BuilderHelm converted the [Bodhan model](https://huggingface.co/bodhan-ai/indic-transcribe-flex) to Core ML for on-device speech recognition on Apple hardware. The export uses the Bodhan checkpoint at `ecba9bac9013c0340fe814b336897ee51ed80be9`, an FP32 audio frontend, an FP16 encoder and a stateful FP16 decoder. It ships the tokenizer and original license alongside the three Core ML packages.
19
 
20
- ## Language and script
 
 
 
 
21
 
22
- Use `en` for Indian English, `hi` with native output for Hindi in Devanagari, and `hi` with romanized output for Hinglish. The other explicit language codes use native output by default. Automatic detection uses the detected language鈥檚 native script. Haryanvi (`bgc`) and Bhili (`bhb`) require explicit selection in the Bodhan detection policy.
 
 
 
 
 
 
23
 
24
- The SDK also exposes the mixed mode. These packages accept 16 kHz mono audio, up to 30 seconds per model request. Long recordings can be split into windows by the host application. On this export the frontend runs on CPU and Core ML can use the GPU for encoder and decoder. No hosted inference endpoint is provided.
25
 
26
- ## Run locally
 
 
 
 
 
 
 
27
 
28
- Use a [BuilderHelmAudio](https://github.com/BuilderHelm/BuilderHelmAudio) checkout containing the Indic-Transcribe Flex runtime on macOS 15 or later. Download this repository鈥檚 packages and tokenizer into the same folder, then run:
29
 
30
- ```sh
31
- swift run bhaudio indic-transcribe speech.wav --model-dir /path/to/model --language hi --mode native --cached
32
- swift run bhaudio indic-transcribe speech.wav --model-dir /path/to/model --language hi --mode romanized --cached
 
 
 
 
 
 
 
33
  ```
34
 
35
- The package files and their SHA-256 checksums are listed in [manifest.json](manifest.json).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- ## Verification
 
 
38
 
39
- In a conversion parity check against the pinned Bodhan runner, native output matched on 26 of 27 language clips, with one Sindhi vowel difference. Three romanized Hinglish clips matched. ZenVoice also reproduced all 33 recorded Core ML outputs after applying the reference audio preprocessing. These are small conversion checks. They do not estimate population word error rate or guarantee performance across accents, domains or recording conditions.
40
 
41
- ## License and provenance
 
 
 
42
 
43
- The conversion is distributed under the unchanged [Indic Open Model License](LICENSE.md). Bodhan AI / AI4Bharat developed Indic-Transcribe Flex. Its upstream [NVIDIA Canary 1B v2](https://huggingface.co/nvidia/canary-1b-v2) is credited under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). BuilderHelm changed the packaging and inference graph for Core ML.
 
5
  base_model: bodhan-ai/indic-transcribe-flex
6
  pipeline_tag: automatic-speech-recognition
7
  language: [as, bgc, bhb, bho, bn, brx, doi, en, gu, hi, hne, kn, kok, ks, mai, ml, mni, mr, ne, or, pa, sa, sat, sd, ta, te, ur]
8
+ tags: [coreml, speech-to-text, multilingual, on-device, apple-silicon, indic, zenvoice]
9
  inference: false
10
  ---
11
+ # Indic-Transcribe Flex 路 Core ML
12
 
13
+ <!-- builderhelm-header -->
14
+ <div align="center">
15
+ <img src="icon.png" width="160" alt="Indic-Transcribe Flex"/>
16
+ </div>
17
 
18
+ <div align="center">
19
+ <a href="https://huggingface.co/BuilderHelm"><img alt="Hugging Face: BuilderHelm" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-BuilderHelm-ffc107?labelColor=555"/></a>
20
+ <a href="https://github.com/BuilderHelm/BuilderHelmAudio"><img alt="GitHub: BuilderHelmAudio" src="https://img.shields.io/badge/GitHub-BuilderHelmAudio-24292f?labelColor=555&logo=github&logoColor=white"/></a>
21
+ <br>
22
+ <a href="https://getzenvoice.com"><img alt="ZenVoice: Homepage" src="https://img.shields.io/badge/ZenVoice-Homepage-536af5?labelColor=555"/></a>
23
+ <a href="https://getzenvoice.com/download"><img alt="Download: ZenVoice for Mac" src="https://img.shields.io/badge/Download-ZenVoice%20for%20Mac-536af5?labelColor=555&logo=apple&logoColor=white"/></a>
24
+ <br>
25
+ <a href="LICENSE.md"><img alt="License: Indic Open Model License" src="https://img.shields.io/badge/License-Indic%20Open%20Model%20License-f5de53?labelColor=555"/></a>
26
+ <img alt="Runs on: Apple Silicon" src="https://img.shields.io/badge/Runs%20on-Apple%20Silicon-8b8b8b?labelColor=555&logo=apple&logoColor=white"/>
27
+ <a href="https://huggingface.co/bodhan-ai/indic-transcribe-flex"><img alt="Base: Indic-Transcribe Flex" src="https://img.shields.io/badge/Base-Indic%20Transcribe%20Flex-76b900?labelColor=555"/></a>
28
+ </div>
29
+ <!-- builderhelm-header -->
30
+
31
+ **27 languages 路 Indian English and Hinglish 路 on-device transcription**
32
 
33
  Built with Indic-Transcribe Flex from Bodhan AI / AI4Bharat.
34
 
35
+ BuilderHelm converted Bodhan AI / AI4Bharat's Indic-Transcribe Flex to Core ML for offline dictation and file transcription in ZenVoice. The export retains the original tokenizer and language prompts. The runtime makes its predictions locally on Apple Silicon.
36
 
37
+ ## Builds
38
+
39
+ | Repository | Weights | Download | Runtime |
40
+ |---|---|---:|---|
41
+ | [Core ML](https://huggingface.co/BuilderHelm/Indic-Transcribe-Flex-CoreML) | FP16 encoder and decoder, FP32 frontend | 2.45 GB | BuilderHelmAudio on Apple Silicon |
42
 
43
+ **Core ML**
44
+
45
+ ```bash
46
+ hf download BuilderHelm/Indic-Transcribe-Flex-CoreML --revision e0fb867958841bda98cb29ddbed6b47d6ec87ec3 --local-dir Indic-Transcribe-Flex-CoreML
47
+ cd Indic-Transcribe-Flex-CoreML
48
+ python3 -c 'import json; print("\n".join("{sha256} {path}".format(**item) for item in json.load(open("manifest.json"))["files"]))' | shasum -a 256 -c
49
+ ```
50
 
51
+ ## Contents
52
 
53
+ | File | Purpose |
54
+ |---|---|
55
+ | `frontend.mlpackage` | FP32 audio feature extraction |
56
+ | `encoder.mlpackage` | FP16 acoustic encoder |
57
+ | `decoder_cached.mlpackage` | FP16 decoder with a stateful attention cache |
58
+ | `tokenizer.json` | Vocabulary, language tokens and output-mode prompts |
59
+ | `manifest.json` | Source revision, file sizes and SHA-256 checksums |
60
+ | `LICENSE.md` | Original Indic Open Model License |
61
 
62
+ ## Swift
63
 
64
+ Use the [BuilderHelmAudio runtime](https://github.com/BuilderHelm/BuilderHelmAudio/pull/9) on macOS 15 or later. Keep the three packages and tokenizer in the same directory. Core ML compiles the packages on the Mac.
65
+
66
+ ```swift
67
+ import BuilderHelmAudio
68
+
69
+ let recognizer = try IndicTranscribeFlex(modelDirectory: modelDirectory, useCachedDecoder: true)
70
+ let hindi = try await recognizer.transcribe(file: audioURL, language: "hi", mode: .native)
71
+ let hinglish = try await recognizer.transcribe(file: audioURL, language: "hi", mode: .romanized)
72
+ let automatic = try await recognizer.transcribe(file: audioURL)
73
+ print(hindi.text, hinglish.text, automatic.language, automatic.text)
74
  ```
75
 
76
+ ## Language and script
77
+
78
+ | ZenVoice choice | Runtime selection | Output |
79
+ |---|---|---|
80
+ | Hindi | `hi`, native | Devanagari |
81
+ | Hinglish | `hi`, romanized | Latin script |
82
+ | Indian English | `en`, native | English |
83
+ | Auto Detect | Omit the language | Native script of the detected language |
84
+ | Other supported languages | Explicit language code, native | The selected language's native script |
85
+
86
+ The model supports Assamese, Bengali, Bhili, Bhojpuri, Bodo, Chhattisgarhi, Dogri, Gujarati, Haryanvi, Hindi, Indian English, Kannada, Kashmiri, Konkani, Maithili, Malayalam, Manipuri, Marathi, Nepali, Odia, Punjabi, Sanskrit, Santali, Sindhi, Tamil, Telugu and Urdu. Bhili and Haryanvi require explicit selection. The SDK also exposes a mixed output mode.
87
+
88
+ ## Conversion
89
+
90
+ BuilderHelm exported the published Bodhan checkpoint as three Core ML packages. The frontend extracts features from 16 kHz mono audio. The encoder processes those features, and the cached decoder reuses attention state during token generation.
91
+
92
+ ## Accuracy
93
+
94
+ | Comparison | Exact matches |
95
+ |---|---:|
96
+ | Core ML against the Bodhan native-output reference | 26 / 27 |
97
+ | Core ML against the Bodhan romanized Hinglish reference | 3 / 3 |
98
+ | ZenVoice on macOS 27 with the CPU encoder against the earlier Core ML reference | 28 / 33 |
99
+
100
+ The difference in the first comparison was one Sindhi vowel. On macOS 27, all 33 fixtures completed, including all three matching Hinglish clips. The five differences were in Haryanvi, Bhili, Bodo and two rows for the same Sindhi vowel. These fixture checks measure transcript agreement. A corpus-wide word error rate is unavailable.
101
+
102
+ ## Device and performance scope
103
+
104
+ The conversion was tested on Apple Silicon. On macOS 27, BuilderHelmAudio runs the encoder on CPU to avoid a Core ML GPU assertion. ZenVoice was tested offline with recorded input through its dictation and file-transcription paths.
105
+
106
+ ## Limitations
107
 
108
+ - **Audio length.** Each model request accepts up to 30 seconds of 16 kHz mono audio. ZenVoice splits longer recordings before inference.
109
+ - **Language detection.** Auto Detect can confuse closely related languages, including Hindi and Urdu. Explicit language selection fixes the requested language and script.
110
+ - **Evaluation coverage.** The test set covers conversion parity on short fixtures. Accuracy across dialects, noise levels and recording devices remains unmeasured.
111
 
112
+ ## Source and reproduction
113
 
114
+ - [Bodhan AI / AI4Bharat checkpoint](https://huggingface.co/bodhan-ai/indic-transcribe-flex/tree/ecba9bac9013c0340fe814b336897ee51ed80be9).
115
+ - [BuilderHelmAudio exporter and parity tools](https://github.com/BuilderHelm/BuilderHelmAudio/tree/53ef82e5aa7dfd05ad70fb0889cb9f11bc322eeb/Scripts/IndicTranscribeFlex).
116
+ - [Core ML artifact manifest](manifest.json) records the source checkpoint and verifies the individual files.
117
+ - The Bodhan model builds on [NVIDIA Canary 1B v2](https://huggingface.co/nvidia/canary-1b-v2), credited under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
118
 
119
+ The conversion is distributed under the unchanged [Indic Open Model License](LICENSE.md). Bodhan AI / AI4Bharat developed the model. BuilderHelm converted and packaged it for Core ML.