Skip to content

Conversation

csukuangfj
Copy link
Collaborator

@csukuangfj csukuangfj commented Sep 9, 2025

See also https://k2-fsa.github.io/sherpa/onnx/tts/all/English/kitten-mini-en-v0_1.html

Screenshot 2025-09-09 at 18 31 54

Summary by CodeRabbit

  • New Features

    • Introduced Kitten TTS Mini v0.1 model support across tools and APK builds.
    • Generated per-speaker audio samples for the Mini model.
    • Added model metadata injection for improved discoverability.
  • Chores

    • Enabled the Kitten sample-generation workflow and publishing for the Mini model.
    • Standardized Nano sample output directories to “-nano” variants.
    • Disabled Matcha EN sample workflow.
  • Revert

    • None
  • Bug Fixes

    • None

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 9, 2025
Copy link

coderabbitai bot commented Sep 9, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds Kitten-TTS mini v0.1 support across workflows and scripts: enables sample generation in CI, updates artifact paths, adds conversion/metadata/sample-generation utilities for mini, adjusts nano sample destinations, and includes the new model in the APK model list.

Changes

Cohort / File(s) Summary of changes
CI workflows
.github/workflows/export-kitten.yaml, .github/workflows/generate-tts-samples.yaml
Export: adds mini_v0_1 to matrix, maps to kitten-mini-en-v0_1-fp16, and collects its results. Generate-samples: enables workflow, adds mini v0.1 generation block and output dirs (v0.1-mini, v0.1-nano, v0.2-nano), disables matcha en job.
APK model list
scripts/apk/generate-tts-apk-script.py
Registers kitten-mini-en-v0_1-fp16 in English Kitten models with standard fields.
Mini v0.1 scripts (new)
scripts/kitten-tts/mini_v0_1/convert_opset.py, .../add_meta_data.py, .../generate_samples.py, .../run.sh, .../generate_tokens.py, .../generate_voices_bin.py, .../show.py, .../test.py
Adds ONNX opset conversion to 19/4, metadata injection, per-speaker sample generation to ./hf/kitten/v0.1-mini/mp3/*.mp3, an orchestration script, and thin redirects to nano equivalents for tokens/voices/show/test.
Nano sample paths
scripts/kitten-tts/nano_v0_1/generate_samples.py, scripts/kitten-tts/nano_v0_2/generate_samples.py
Changes output directories to ./hf/kitten/v0.1-nano/mp3 and ./hf/kitten/v0.2-nano/mp3 respectively.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant GH as GitHub Actions
  participant HF as HuggingFace artifacts
  participant Mini as mini_v0_1 scripts
  participant FS as Filesystem

  rect rgba(230,240,255,0.5)
  note right of GH: generate-tts-samples.yaml (enabled)
  GH->>FS: mkdir -p ./hf/kitten/v0.1-mini/mp3<br/>mkdir -p ./hf/kitten/v0.1-nano/mp3<br/>mkdir -p ./hf/kitten/v0.2-nano/mp3
  GH->>HF: Download kitten-mini-en-v0_1-fp16.tar.bz2
  HF-->>GH: Model + assets
  GH->>FS: Extract and link assets (hf/)
  GH->>Mini: Run generate_samples.py (mini v0.1)
  Mini->>FS: Write per-speaker MP3s to ./hf/kitten/v0.1-mini/mp3
  end

  rect rgba(240,255,240,0.5)
  note right of GH: nano flows unchanged except output dirs
  GH->>FS: Run nano v0.1/v0.2 generate_samples.py
  FS-->FS: Write MP3s to ./hf/kitten/v0.1-nano/mp3 and ./hf/kitten/v0.2-nano/mp3
  end
Loading
sequenceDiagram
  autonumber
  participant Dev as Developer
  participant SH as run.sh (mini v0.1)
  participant HF as HuggingFace
  participant Py as Python tools

  Dev->>SH: Execute run.sh
  alt missing model/voices
    SH->>HF: Download kitten_tts_mini_v0_1.onnx / voices.npz
    HF-->>SH: Files
  end
  SH->>Py: generate_voices_bin.py / generate_tokens.py
  SH->>Py: convert_opset.py (set opset 19 + ai.onnx.ml=4)
  SH->>Py: show.py (inspect)
  SH->>Py: add_meta_data.py --model ./model.fp16.onnx
  SH->>Dev: ls -lh (outputs)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

In burrows of bytes I thump with glee,
Mini hops in, as sleek as can be.
Nano trails paths with tidy delight,
MP3 carrots glint in the night.
Workflows awake, whiskers all set—
Kitten purrs; we ship it, yet! 🐇🎶

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1d6592 and 3be4660.

📒 Files selected for processing (13)
  • .github/workflows/export-kitten.yaml (3 hunks)
  • .github/workflows/generate-tts-samples.yaml (4 hunks)
  • scripts/apk/generate-tts-apk-script.py (1 hunks)
  • scripts/kitten-tts/mini_v0_1/add_meta_data.py (1 hunks)
  • scripts/kitten-tts/mini_v0_1/convert_opset.py (1 hunks)
  • scripts/kitten-tts/mini_v0_1/generate_samples.py (1 hunks)
  • scripts/kitten-tts/mini_v0_1/generate_tokens.py (1 hunks)
  • scripts/kitten-tts/mini_v0_1/generate_voices_bin.py (1 hunks)
  • scripts/kitten-tts/mini_v0_1/run.sh (1 hunks)
  • scripts/kitten-tts/mini_v0_1/show.py (1 hunks)
  • scripts/kitten-tts/mini_v0_1/test.py (1 hunks)
  • scripts/kitten-tts/nano_v0_1/generate_samples.py (1 hunks)
  • scripts/kitten-tts/nano_v0_2/generate_samples.py (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@csukuangfj csukuangfj merged commit 9a73770 into k2-fsa:master Sep 9, 2025
1 check was pending
@csukuangfj csukuangfj deleted the kitten-mini branch September 9, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant