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79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# Running Modal ASR Baselines

BES-4805 evaluates NVIDIA Parakeet TDT 0.6B v3 as the batch baseline
`modal_nvidia_parakeet_tdt_0_6b_v3`. The checked-in deployment source is
`modal/parakeet_tdt_0_6b_v3.py`; do not use owner-private deployment code or
the old non-ticket model ID.

## Deployment Constants

- Benchmark model ID: `modal_nvidia_parakeet_tdt_0_6b_v3`
- Upstream model: `nvidia/parakeet-tdt-0.6b-v3`
- Upstream revision: `b51b7dc0fbf7f266a97880fb4b626c56d28f4b96`
- Modal app: `voice-code-bench-parakeet`
- Modal GPU: `L40S`
- Modal Volume: `voice-code-bench-parakeet-hf-cache`
- Runtime: Transformers `5.12.0`
- Endpoint secret: `MODAL_PARAKEET_ENDPOINT`

The app stores official Hugging Face weights in the Modal Volume at `/models`
and loads them once per warm container with `@modal.enter`. The benchmark sends
one complete 16 kHz mono WAV per request. There is no chunking, no prompts, no
custom vocabulary, and no post-ASR correction.

The Meta OmniASR section below covers BES-4806. Inworld STT is not part of these Modal deployment paths.

## Modal Credentials

Install and configure the Modal CLI/API credentials for the workspace that will
own the deployment:

```bash
python -m pip install modal==1.4.1
modal setup
```

Create a Modal proxy token for the environment that will serve the Web Function:

```bash
modal workspace proxy-tokens create
```

If your workspace uses scoped proxy tokens, allow the token in the deployment
environment. Store the endpoint and proxy token in the ignored `scripts/.secret`
file:

```dotenv
MODAL_PARAKEET_ENDPOINT=https://<your-parakeet-web-function>.modal.run
MODAL_PROXY_TOKEN_ID=wk-...
MODAL_PROXY_TOKEN_SECRET=ws-...
```

The entity-verification stage of `vcb-run` also needs `OPENAI_API_KEY=...`.
Never commit `scripts/.secret`.

## Warm The Model Cache

Run the cache warm-up before deployment:

```bash
modal run modal/parakeet_tdt_0_6b_v3.py::download_model
```

Verify in Modal logs that the download used
`nvidia/parakeet-tdt-0.6b-v3` at
`b51b7dc0fbf7f266a97880fb4b626c56d28f4b96` and wrote under
`/models/nvidia/parakeet-tdt-0.6b-v3`. The revision literal in
`modal/parakeet_tdt_0_6b_v3.py`, the volume directory, and the Hugging Face
revision should match before releasing results.

## Deploy

Deploy the Web Function:

```bash
modal deploy modal/parakeet_tdt_0_6b_v3.py
```

Copy the authenticated Web Function URL printed by Modal, or find it in the
Modal dashboard for `voice-code-bench-parakeet`, and save it as
`MODAL_PARAKEET_ENDPOINT`. The benchmark adapter accepts the exact Web Function
URL and normalizes trailing slashes.

The endpoint accepts JSON only:

```json
{
  "audio_base64": "<base64-encoded 16 kHz mono WAV bytes>",
  "audio_format": "wav"
}
```

It also accepts optional `"language": "en"` for manual compatibility checks,
but the registered benchmark configuration does not send a language hint. The
response body is exactly:

```json
{
  "transcript": "<verbatim model output>"
}
```

Requests must include the proxy-token headers:

```text
Modal-Key: <MODAL_PROXY_TOKEN_ID>
Modal-Secret: <MODAL_PROXY_TOKEN_SECRET>
```

The benchmark stores only the returned transcript verbatim.

## Longest-Recording Smoke Test

Create a one-row metadata file for the longest recording,
`audio_id=education_workplace_006` (`data/audio/261.wav`, 122.875 seconds):

```bash
mkdir -p runs/parakeet-longest-smoke
python - <<'PY'
import json
from pathlib import Path
source = Path('data/metadata.jsonl')
out = Path('runs/parakeet-longest-smoke/metadata.longest.jsonl')
for line in source.read_text().splitlines():
    row = json.loads(line)
    if row['audio_id'] == 'education_workplace_006':
        out.write_text(json.dumps(row, separators=(',', ':')) + '\n')
        break
else:
    raise SystemExit('education_workplace_006 not found')
PY
```

Run the smoke transcription without using `--limit 1`:

```bash
vcb-transcribe \
  --metadata runs/parakeet-longest-smoke/metadata.longest.jsonl \
  --stt-model-ids modal_nvidia_parakeet_tdt_0_6b_v3 \
  --output-dir runs/parakeet-longest-smoke
```

Inspect `runs/parakeet-longest-smoke/modal_nvidia_parakeet_tdt_0_6b_v3/transcripts.json`
and confirm it has one non-empty `model_transcript` for
`education_workplace_006`. Modal logs should show one complete request for the
122.875-second WAV and no client-side chunking.

## Full Run

With `MODAL_PARAKEET_ENDPOINT`, `MODAL_PROXY_TOKEN_ID`,
`MODAL_PROXY_TOKEN_SECRET`, and `OPENAI_API_KEY` configured, run:

```bash
vcb-run \
  --stt-model-ids modal_nvidia_parakeet_tdt_0_6b_v3 \
  --resume \
  --output-dir runs/parakeet-full
```

If interrupted, rerun the same command with `--resume`. After the run completes,
validate that transcripts and entity matches cover all 300 audio IDs in
`data/metadata.jsonl` order, then copy the generated entity-match artifact to
`baselines/predictions/modal_nvidia_parakeet_tdt_0_6b_v3.json` without editing
transcripts, entity decisions, or run metadata by hand.

Regenerate current aggregate outputs after the prediction artifact exists:

```bash
vcb-score-entities \
  --dataset-root . \
  --metadata data/metadata.jsonl \
  --entity-matches-dir baselines/predictions \
  --output-dir baselines \
  --scores-dir baselines/scores/entities \
  --output-csv baselines/results.csv

vcb-score-wer \
  --dataset-root . \
  --metadata data/metadata.jsonl \
  --transcripts-dir baselines/predictions \
  --output-dir baselines \
  --scores-dir baselines/scores/wer \
  --output-csv baselines/results.csv

vcb-make-figures --model-set all
```

`./scripts/reproduce_release.sh` remains the frozen paper reproduction path and
must not require Modal credentials.

## Meta OmniASR LLM Unlimited 7B v2

BES-4806 evaluates Meta OmniASR Unlimited 7B v2 as the batch model ID
`modal_meta_omniasr_llm_unlimited_7b_v2`. The checked-in deployment source is
`modal/omniasr_llm_unlimited_7b_v2.py`; do not use the standard 40-second
OmniASR models, the public Replicate endpoint, private deployment code, or a
client-side chunking wrapper.

### OmniASR Deployment Constants

- Benchmark model ID: `modal_meta_omniasr_llm_unlimited_7b_v2`
- Upstream model card: `omniASR_LLM_Unlimited_7B_v2`
- Runtime and catalog revision: `omnilingual-asr==0.2.0`
- Modal app: `voice-code-bench-omniasr`
- Modal GPU: `L40S`
- Modal Volume: `voice-code-bench-omniasr-fairseq2-cache`
- Fairseq2 asset cache: `/root/.cache/fairseq2/assets`
- Language conditioning: `eng_Latn`
- Endpoint secret: `MODAL_OMNIASR_ENDPOINT`

The app mounts the persistent fairseq2 asset cache Volume at
`/root/.cache/fairseq2/assets`, warms the official assets before deployment, and
constructs `ASRInferencePipeline(model_card="omniASR_LLM_Unlimited_7B_v2")` once
per warm container with `@modal.enter`. Each benchmark request sends one
complete 16 kHz mono WAV. There is no client-side chunking, server-side
chunking, prompt, target entity list, custom vocabulary, canonicalization, or
post-ASR correction.

Live OmniASR deployment and release are blocked until the runner has a usable
Modal deployment credential, a deployed Web Function URL, `MODAL_PROXY_TOKEN_ID`,
`MODAL_PROXY_TOKEN_SECRET`, and either a live entity-verifier credential or a
complete verifier cache accepted by `vcb-run`. Mock output is never releasable.

### OmniASR Credentials

Install and configure Modal for the workspace that will own the app:

```bash
python -m pip install modal==1.4.1
modal setup
```

Create a Modal proxy token for the deployment environment:

```bash
modal workspace proxy-tokens create
```

Store only private values in ignored `scripts/.secret` or equivalent environment
variables:

```dotenv
MODAL_OMNIASR_ENDPOINT=https://<your-omniasr-web-function>.modal.run
MODAL_PROXY_TOKEN_ID=wk-...
MODAL_PROXY_TOKEN_SECRET=ws-...
OPENAI_API_KEY=...
```

Never commit `scripts/.secret` or proxy token values.

### Warm The OmniASR Cache

Run cache warm-up before deployment:

```bash
modal run modal/omniasr_llm_unlimited_7b_v2.py::warm_model_cache
```

Verify Modal logs show `omniASR_LLM_Unlimited_7B_v2`,
`omnilingual-asr==0.2.0`, and `/root/.cache/fairseq2/assets`. Rerun the warm-up
if it is interrupted; a successful rerun should reuse the persistent Volume
instead of downloading the full asset set again. If serving reports a missing
asset cache, rerun only this warm-up path before redeploying.

### Deploy OmniASR

Deploy the authenticated Web Function:

```bash
modal deploy modal/omniasr_llm_unlimited_7b_v2.py
```

Copy the Web Function URL printed by Modal, or find it in the dashboard for
`voice-code-bench-omniasr`, and save it as `MODAL_OMNIASR_ENDPOINT`. The
benchmark adapter accepts the URL and normalizes trailing slashes.

The endpoint accepts JSON only:

```json
{
  "audio_base64": "<base64-encoded 16 kHz mono WAV bytes>",
  "audio_format": "wav",
  "language": "eng_Latn"
}
```

The response body is exactly:

```json
{
  "transcript": "<verbatim model output>"
}
```

Requests must include the proxy-token headers:

```text
Modal-Key: <MODAL_PROXY_TOKEN_ID>
Modal-Secret: <MODAL_PROXY_TOKEN_SECRET>
```

A request without those headers should be rejected before inference. Endpoint
errors must not include proxy token values.

### OmniASR Longest-Recording Smoke Test

Create a one-row metadata file for the longest recording,
`audio_id=education_workplace_006` (`data/audio/261.wav`, 122.875 seconds). Do
not use `--limit 1`, because that selects the first metadata row rather than the
longest recording.

```bash
mkdir -p runs/omniasr-longest-smoke
python - <<'PY'
import json
from pathlib import Path
source = Path('data/metadata.jsonl')
out = Path('runs/omniasr-longest-smoke/metadata.longest.jsonl')
for line in source.read_text().splitlines():
    row = json.loads(line)
    if row['audio_id'] == 'education_workplace_006':
        out.write_text(json.dumps(row, separators=(',', ':')) + '\n')
        break
else:
    raise SystemExit('education_workplace_006 not found')
PY
```

Run the smoke transcription:

```bash
vcb-transcribe \
  --metadata runs/omniasr-longest-smoke/metadata.longest.jsonl \
  --stt-model-ids modal_meta_omniasr_llm_unlimited_7b_v2 \
  --output-dir runs/omniasr-longest-smoke
```

Inspect
`runs/omniasr-longest-smoke/modal_meta_omniasr_llm_unlimited_7b_v2/transcripts.json`
and Modal logs. Confirm exactly one non-empty `model_transcript` for
`education_workplace_006`, one complete 122.875-second request, language
`eng_Latn`, batch size 1, and no client-side chunking. Send a second
authenticated smoke request while the container is warm and confirm logs do not
show another pipeline construction for the same warm container.

### OmniASR Full Run And Release Artifact

After the longest-recording smoke test succeeds, run all 300 recordings with
resume enabled from the first invocation:

```bash
vcb-run \
  --stt-model-ids modal_meta_omniasr_llm_unlimited_7b_v2 \
  --resume \
  --output-dir runs/omniasr-full
```

If interrupted, rerun the identical command with `--resume`. Do not regenerate
completed rows. Do not score or release mock transcripts.

Before copying anything to `baselines/predictions/`, validate the final artifact
against `data/metadata.jsonl`: exactly 300 rows, exactly 300 unique `audio_id`
values, identical order, one non-empty `model_transcript` for every row, entity
matches for every target entity, and run metadata containing provider `modal`,
model `omniASR_LLM_Unlimited_7B_v2`, revision `omnilingual-asr==0.2.0`,
`language="eng_Latn"`, the real normalized endpoint, evaluation date, mode
`batch`, L40S, batch size 1, timeout 600 seconds, and 10 max attempts.

Only after that validation passes, copy the generated entity-match artifact to:

```text
baselines/predictions/modal_meta_omniasr_llm_unlimited_7b_v2.json
```

Do not hand-edit transcripts, entity decisions, or run metadata.

Regenerate current aggregate outputs after the real prediction artifact exists:

```bash
vcb-score-entities \
  --dataset-root . \
  --metadata data/metadata.jsonl \
  --entity-matches-dir baselines/predictions \
  --output-dir baselines \
  --scores-dir baselines/scores/entities \
  --output-csv baselines/results.csv

vcb-score-wer \
  --dataset-root . \
  --metadata data/metadata.jsonl \
  --transcripts-dir baselines/predictions \
  --output-dir baselines \
  --scores-dir baselines/scores/wer \
  --output-csv baselines/results.csv

vcb-make-figures --model-set all
```

Update README counts, ranges, and exact OmniASR WER/CTEM/TSR only from the
computed `baselines/results.csv` row. `./scripts/reproduce_release.sh` remains
the frozen paper reproduction path and must not require Modal credentials or add
OmniASR to `PAPER_MODEL_IDS`.

### OmniASR Cleanup

Stop the app when no more requests are expected:

```bash
modal app stop voice-code-bench-omniasr
```

Retain `voice-code-bench-omniasr-fairseq2-cache` while the released baseline may
need reruns. Delete the Volume only when you intentionally want to remove the
cached official assets and are ready to rerun `warm_model_cache`.

## Teardown

After release, stop the app if no more requests are expected:

```bash
modal app stop voice-code-bench-parakeet
```

Retain the `voice-code-bench-parakeet-hf-cache` volume while the released
baseline may need reruns. Delete the volume only when you intentionally want to
remove the cached official weights and are ready to rerun the warm-up step.