{"owner":"NVIDIA-NeMo","repo":"Speech","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# CLAUDE.md / AGENTS.md\n\nThis file provides guidance when working with code in this repository.\n\n## Project Overview\n\nNeMo Speech — toolkit for training/deploying speech models (ASR, TTS, Speech LLM). Active collections: `asr`, `tts`, `audio`, `speechlm2`, `common`. No Megatron / Megatron Core / Transformer Engine — parallelism is PyTorch-native (DDP, FSDP2, TP/SP via DTensor).\n\n## Build & Install\n\nSee the canonical installation guide — [`docs/source/starthere/install.rst`](docs/source/starthere/install.rst) (published at https://docs.nvidia.com/nemo/speech/nightly/) — for the uv, pip (bring-your-own Python/PyTorch/CUDA), Docker, and optional `compiled` (SpeechLM2/Automodel) install paths.\n\nDev quickstart: `uv sync --extra all --extra cu13` (Python 3.12+, PyTorch 2.7+; `test`/`docs` are `--group`s, not extras).\n\n## Code Style\n\n- **Line length: 119** (not default 88) — consistent across black, isort, flake8\n- Black with `skip_string_normalization = true`\n- isort with `profile = black`\n- Check: `isort --check <path> && black --check <path>` or `isort --check . && black --check .`\n- Fix: `isort <path> && black <path>` or `isort . && black .`\n- Jupyter Notebooks are excluded from automatic black reformatting (see `extend-exclude`), but can be still reformatted when passed directly. Do not reformat notebooks outside your changes.\n- **Helper placement**: keep public APIs and top-level classes/functions near the top of a file; place private\n  helpers and utilities at the bottom of the file unless a local module convention requires otherwise.\n\n## Testing\n\n```bash\npytest tests/collections/asr -m \"not pleasefixme\" -v     # ASR tests, skip broken\npytest tests/collections/tts -m unit -v                  # TTS unit tests\npytest -k \"test_name\" tests/                             # Single test by name\n```\n\nMarkers: `unit`, `integration`, `system`, `pleasefixme` (broken — skip), `skipduringci`.\n\n## CI & PRs\n\n- NVIDIA developers: feature branches off `main`; community: fork-based workflow\n- CI triggered by adding **\"Run CICD\"** label to the PR\n- E2E nightly tests: only when really needed. Add both **\"Run e2e nightly\"** and **\"Run CICD\"** labels\n- `skip-linting` / `skip-docs` labels bypass those checks\n- Formatting CI auto-commits black/isort fixes back to the PR branch\n- CI: GitHub Actions in `.github/workflows/`\n\n## Documentation\n\nSphinx-based docs live in `docs/source/`. Build with:\n\n```bash\nuv sync --locked --group docs                        # one-time setup (matches CI)\nuv run make -C docs clean html                       # full rebuild\nuv run make -C docs html                             # incremental rebuild\n```\n\nOutput goes to `docs/build/html/`. Open `docs/build/html/index.html` to preview locally.\n\nOther useful targets: `make -C docs linkcheck` (verify external links), `make -C docs doctest` (run embedded doctests).\n\n## Training & Inference\n\nEntry-point scripts live under `examples/<collection>/`.\n\nAll scripts follow the same Hydra pattern — a `@hydra_runner` decorator points to a YAML config in a nearby `conf/` directory:\n\n```python\n@hydra_runner(config_path=\"conf\", config_name=\"fast-conformer_transducer_bpe\")\ndef main(cfg):\n    trainer = pl.Trainer(**resolve_trainer_cfg(cfg.trainer))\n    exp_manager(trainer, cfg.get(\"exp_manager\", None))\n    model = EncDecRNNTBPEModel(cfg=cfg.model, trainer=trainer)\n    trainer.fit(model)\n```\n\nOverride any config value from the CLI with Hydra syntax: `python script.py model.optim.lr=1e-4 trainer.max_epochs=50`. Browse configs with `ls examples/<collection>/conf/` to see which models and variants are supported.\n\n## Handy Scripts\n\nUtility scripts live under `scripts/`. Key subdirectories: `speech_recognition/`, `speechlm2/`, `speaker_tasks/`, `tokenizers/`, `dataset_processing/`, `asr_language_modeling/`. Browse with `ls scripts/`.\n\nFour frequently used data/training helpers:\n\n- **`scripts/speech_recognition/estimate_duration_bins.py`** — estimate Lhotse dynamic-bucketing duration bins from a manifest or YAML input config. Usage: `python scripts/speech_recognition/estimate_duration_bins.py <input> -b 30 -n 100000`\n- **`scripts/speech_recognition/oomptimizer.py`** — find the largest batch size per bucket that fits in GPU memory. Usage: `python scripts/speech_recognition/oomptimizer.py --pretrained-name nvidia/canary-1b` or point to a config with `--config-path`.\n- **`scripts/speech_recognition/estimate_data_weights.py`** — compute per-dataset sampling weights from YAML input configs, with optional temperature re-weighting. Usage: `python scripts/speech_recognition/estimate_data_weights.py input.yaml output.yaml -t 0.5`\n- **`scripts/speech_recognition/convert_to_tarred_audio_dataset.py`** — shard audio+manifest into tar files. Usage: `python scripts/speech_recognition/convert_to_tarred_audio_dataset.py --manifest_path=m.json --target_dir=./tar --num_shards=512 --max_duration=60.0`\n\n## Architecture\n\n- **Hydra + OmegaConf** for all config management (YAML configs)\n- **PyTorch Lightning** for training orchestration\n- **Lhotse** (>=1.32.2) for audio data loading\n- Collections are semi-isolated domains sharing `nemo.core` and `nemo.collections.common`\n\n## Subdirectory Instructions\n\nModule-specific instructions can be added as `CLAUDE.md` or `AGENTS.md` files in subdirectories.\n\n## Issue Reproduction\n\nWhen fixing a bug, always:\n1. First reproduce the issue with a minimal test case\n2. Add the reproduction as a unit test\n3. Then fix the issue\n4. Verify the test passes\n\n## Forbidden Operations\n\n- Never push directly to `main`\n- Never modify `.github/workflows/` without explicit instruction\n- Never delete test files without explicit instruction\n"},"files":{"CLAUDE.md":"# CLAUDE.md / AGENTS.md\n\nThis file provides guidance when working with code in this repository.\n\n## Project Overview\n\nNeMo Speech — toolkit for training/deploying speech models (ASR, TTS, Speech LLM). Active collections: `asr`, `tts`, `audio`, `speechlm2`, `common`. No Megatron / Megatron Core / Transformer Engine — parallelism is PyTorch-native (DDP, FSDP2, TP/SP via DTensor).\n\n## Build & Install\n\nSee the canonical installation guide — [`docs/source/starthere/install.rst`](docs/source/starthere/install.rst) (published at https://docs.nvidia.com/nemo/speech/nightly/) — for the uv, pip (bring-your-own Python/PyTorch/CUDA), Docker, and optional `compiled` (SpeechLM2/Automodel) install paths.\n\nDev quickstart: `uv sync --extra all --extra cu13` (Python 3.12+, PyTorch 2.7+; `test`/`docs` are `--group`s, not extras).\n\n## Code Style\n\n- **Line length: 119** (not default 88) — consistent across black, isort, flake8\n- Black with `skip_string_normalization = true`\n- isort with `profile = black`\n- Check: `isort --check <path> && black --check <path>` or `isort --check . && black --check .`\n- Fix: `isort <path> && black <path>` or `isort . && black .`\n- Jupyter Notebooks are excluded from automatic black reformatting (see `extend-exclude`), but can be still reformatted when passed directly. Do not reformat notebooks outside your changes.\n- **Helper placement**: keep public APIs and top-level classes/functions near the top of a file; place private\n  helpers and utilities at the bottom of the file unless a local module convention requires otherwise.\n\n## Testing\n\n```bash\npytest tests/collections/asr -m \"not pleasefixme\" -v     # ASR tests, skip broken\npytest tests/collections/tts -m unit -v                  # TTS unit tests\npytest -k \"test_name\" tests/                             # Single test by name\n```\n\nMarkers: `unit`, `integration`, `system`, `pleasefixme` (broken — skip), `skipduringci`.\n\n## CI & PRs\n\n- NVIDIA developers: feature branches off `main`; community: fork-based workflow\n- CI triggered by adding **\"Run CICD\"** label to the PR\n- E2E nightly tests: only when really needed. Add both **\"Run e2e nightly\"** and **\"Run CICD\"** labels\n- `skip-linting` / `skip-docs` labels bypass those checks\n- Formatting CI auto-commits black/isort fixes back to the PR branch\n- CI: GitHub Actions in `.github/workflows/`\n\n## Documentation\n\nSphinx-based docs live in `docs/source/`. Build with:\n\n```bash\nuv sync --locked --group docs                        # one-time setup (matches CI)\nuv run make -C docs clean html                       # full rebuild\nuv run make -C docs html                             # incremental rebuild\n```\n\nOutput goes to `docs/build/html/`. Open `docs/build/html/index.html` to preview locally.\n\nOther useful targets: `make -C docs linkcheck` (verify external links), `make -C docs doctest` (run embedded doctests).\n\n## Training & Inference\n\nEntry-point scripts live under `examples/<collection>/`.\n\nAll scripts follow the same Hydra pattern — a `@hydra_runner` decorator points to a YAML config in a nearby `conf/` directory:\n\n```python\n@hydra_runner(config_path=\"conf\", config_name=\"fast-conformer_transducer_bpe\")\ndef main(cfg):\n    trainer = pl.Trainer(**resolve_trainer_cfg(cfg.trainer))\n    exp_manager(trainer, cfg.get(\"exp_manager\", None))\n    model = EncDecRNNTBPEModel(cfg=cfg.model, trainer=trainer)\n    trainer.fit(model)\n```\n\nOverride any config value from the CLI with Hydra syntax: `python script.py model.optim.lr=1e-4 trainer.max_epochs=50`. Browse configs with `ls examples/<collection>/conf/` to see which models and variants are supported.\n\n## Handy Scripts\n\nUtility scripts live under `scripts/`. Key subdirectories: `speech_recognition/`, `speechlm2/`, `speaker_tasks/`, `tokenizers/`, `dataset_processing/`, `asr_language_modeling/`. Browse with `ls scripts/`.\n\nFour frequently used data/training helpers:\n\n- **`scripts/speech_recognition/estimate_duration_bins.py`** — estimate Lhotse dynamic-bucketing duration bins from a manifest or YAML input config. Usage: `python scripts/speech_recognition/estimate_duration_bins.py <input> -b 30 -n 100000`\n- **`scripts/speech_recognition/oomptimizer.py`** — find the largest batch size per bucket that fits in GPU memory. Usage: `python scripts/speech_recognition/oomptimizer.py --pretrained-name nvidia/canary-1b` or point to a config with `--config-path`.\n- **`scripts/speech_recognition/estimate_data_weights.py`** — compute per-dataset sampling weights from YAML input configs, with optional temperature re-weighting. Usage: `python scripts/speech_recognition/estimate_data_weights.py input.yaml output.yaml -t 0.5`\n- **`scripts/speech_recognition/convert_to_tarred_audio_dataset.py`** — shard audio+manifest into tar files. Usage: `python scripts/speech_recognition/convert_to_tarred_audio_dataset.py --manifest_path=m.json --target_dir=./tar --num_shards=512 --max_duration=60.0`\n\n## Architecture\n\n- **Hydra + OmegaConf** for all config management (YAML configs)\n- **PyTorch Lightning** for training orchestration\n- **Lhotse** (>=1.32.2) for audio data loading\n- Collections are semi-isolated domains sharing `nemo.core` and `nemo.collections.common`\n\n## Subdirectory Instructions\n\nModule-specific instructions can be added as `CLAUDE.md` or `AGENTS.md` files in subdirectories.\n\n## Issue Reproduction\n\nWhen fixing a bug, always:\n1. First reproduce the issue with a minimal test case\n2. Add the reproduction as a unit test\n3. Then fix the issue\n4. Verify the test passes\n\n## Forbidden Operations\n\n- Never push directly to `main`\n- Never modify `.github/workflows/` without explicit instruction\n- Never delete test files without explicit instruction\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md / AGENTS.md\n\nThis file provides guidance when working with code in this repository.\n\n## Project Overview\n\nNeMo Speech — toolkit for training/deploying speech models (ASR, TTS, Speech LLM). Active collections: `asr`, `tts`, `audio`, `speechlm2`, `common`. No Megatron / Megatron Core / Transformer Engine — parallelism is PyTorch-native (DDP, FSDP2, TP/SP via DTensor).\n\n## Build & Install\n\nSee the canonical installation guide — [`docs/source/starthere/install.rst`](docs/source/starthere/install.rst) (published at https://docs.nvidia.com/nemo/speech/nightly/) — for the uv, pip (bring-your-own Python/PyTorch/CUDA), Docker, and optional `compiled` (SpeechLM2/Automodel) install paths.\n\nDev quickstart: `uv sync --extra all --extra cu13` (Python 3.12+, PyTorch 2.7+; `test`/`docs` are `--group`s, not extras).\n\n## Code Style\n\n- **Line length: 119** (not default 88) — consistent across black, isort, flake8\n- Black with `skip_string_normalization = true`\n- isort with `profile = black`\n- Check: `isort --check <path> && black --check <path>` or `isort --check . && black --check .`\n- Fix: `isort <path> && black <path>` or `isort . && black .`\n- Jupyter Notebooks are excluded from automatic black reformatting (see `extend-exclude`), but can be still reformatted when passed directly. Do not reformat notebooks outside your changes.\n- **Helper placement**: keep public APIs and top-level classes/functions near the top of a file; place private\n  helpers and utilities at the bottom of the file unless a local module convention requires otherwise.\n\n## Testing\n\n```bash\npytest tests/collections/asr -m \"not pleasefixme\" -v     # ASR tests, skip broken\npytest tests/collections/tts -m unit -v                  # TTS unit tests\npytest -k \"test_name\" tests/                             # Single test by name\n```\n\nMarkers: `unit`, `integration`, `system`, `pleasefixme` (broken — skip), `skipduringci`.\n\n## CI & PRs\n\n- NVIDIA developers: feature branches off `main`; community: fork-based workflow\n- CI triggered by adding **\"Run CICD\"** label to the PR\n- E2E nightly tests: only when really needed. Add both **\"Run e2e nightly\"** and **\"Run CICD\"** labels\n- `skip-linting` / `skip-docs` labels bypass those checks\n- Formatting CI auto-commits black/isort fixes back to the PR branch\n- CI: GitHub Actions in `.github/workflows/`\n\n## Documentation\n\nSphinx-based docs live in `docs/source/`. Build with:\n\n```bash\nuv sync --locked --group docs                        # one-time setup (matches CI)\nuv run make -C docs clean html                       # full rebuild\nuv run make -C docs html                             # incremental rebuild\n```\n\nOutput goes to `docs/build/html/`. Open `docs/build/html/index.html` to preview locally.\n\nOther useful targets: `make -C docs linkcheck` (verify external links), `make -C docs doctest` (run embedded doctests).\n\n## Training & Inference\n\nEntry-point scripts live under `examples/<collection>/`.\n\nAll scripts follow the same Hydra pattern — a `@hydra_runner` decorator points to a YAML config in a nearby `conf/` directory:\n\n```python\n@hydra_runner(config_path=\"conf\", config_name=\"fast-conformer_transducer_bpe\")\ndef main(cfg):\n    trainer = pl.Trainer(**resolve_trainer_cfg(cfg.trainer))\n    exp_manager(trainer, cfg.get(\"exp_manager\", None))\n    model = EncDecRNNTBPEModel(cfg=cfg.model, trainer=trainer)\n    trainer.fit(model)\n```\n\nOverride any config value from the CLI with Hydra syntax: `python script.py model.optim.lr=1e-4 trainer.max_epochs=50`. Browse configs with `ls examples/<collection>/conf/` to see which models and variants are supported.\n\n## Handy Scripts\n\nUtility scripts live under `scripts/`. Key subdirectories: `speech_recognition/`, `speechlm2/`, `speaker_tasks/`, `tokenizers/`, `dataset_processing/`, `asr_language_modeling/`. Browse with `ls scripts/`.\n\nFour frequently used data/training helpers:\n\n- **`scripts/speech_recognition/estimate_duration_bins.py`** — estimate Lhotse dynamic-bucketing duration bins from a manifest or YAML input config. Usage: `python scripts/speech_recognition/estimate_duration_bins.py <input> -b 30 -n 100000`\n- **`scripts/speech_recognition/oomptimizer.py`** — find the largest batch size per bucket that fits in GPU memory. Usage: `python scripts/speech_recognition/oomptimizer.py --pretrained-name nvidia/canary-1b` or point to a config with `--config-path`.\n- **`scripts/speech_recognition/estimate_data_weights.py`** — compute per-dataset sampling weights from YAML input configs, with optional temperature re-weighting. Usage: `python scripts/speech_recognition/estimate_data_weights.py input.yaml output.yaml -t 0.5`\n- **`scripts/speech_recognition/convert_to_tarred_audio_dataset.py`** — shard audio+manifest into tar files. Usage: `python scripts/speech_recognition/convert_to_tarred_audio_dataset.py --manifest_path=m.json --target_dir=./tar --num_shards=512 --max_duration=60.0`\n\n## Architecture\n\n- **Hydra + OmegaConf** for all config management (YAML configs)\n- **PyTorch Lightning** for training orchestration\n- **Lhotse** (>=1.32.2) for audio data loading\n- Collections are semi-isolated domains sharing `nemo.core` and `nemo.collections.common`\n\n## Subdirectory Instructions\n\nModule-specific instructions can be added as `CLAUDE.md` or `AGENTS.md` files in subdirectories.\n\n## Issue Reproduction\n\nWhen fixing a bug, always:\n1. First reproduce the issue with a minimal test case\n2. Add the reproduction as a unit test\n3. Then fix the issue\n4. Verify the test passes\n\n## Forbidden Operations\n\n- Never push directly to `main`\n- Never modify `.github/workflows/` without explicit instruction\n- Never delete test files without explicit instruction\n","category":"root","tokens":1417}]}