Skip to content

Mandarin jieba HMM assets (jieba_hmm_*.bin) missing from ANE-zh/assets on Hugging Face #919

Description

@ChungMai

Summary

KokoroAneResourceDownloader.ensureMandarinJiebaHmm tries to fetch three jieba HMM asset files from the FluidInference/kokoro-82m-coreml Hugging Face repo, but those files have never been uploaded there. Every Mandarin synthesis session logs a 404 warning and silently falls back to FMM/single-char segmentation.

Expected behavior

Either:

  • The three jieba HMM files exist at ANE-zh/assets/ on the Hugging Face repo and download successfully, or
  • The client doesn't attempt the download / doesn't log a warning for an asset that is known to not exist yet.

Actual behavior

Every time the Mandarin (v1.1-zh) variant initializes, this warning is logged:

[FluidAudio.KokoroAneResourceDownloader] Jieba HMM asset 'jieba_hmm_start.bin' unavailable (Unexpected response (status 404) while downloading jieba HMM asset jieba_hmm_start.bin); HMM segmentation disabled.

This is non-fatal (Mandarin synthesis still works via the FMM/single-char fallback), but it repeats on every fresh prepare since the asset never caches locally, and it looks alarming in logs.

Root cause

KokoroAneConstants.swift points the jieba HMM download at:

public static let g2pRemoteRepo = "FluidInference/kokoro-82m-coreml"
public static let g2pRemoteSubdir = "ANE-zh/assets"
public static let jiebaHmmStartRemoteFile = "jieba_hmm_start.bin"
public static let jiebaHmmTransRemoteFile = "jieba_hmm_trans.bin"
public static let jiebaHmmEmitRemoteFile = "jieba_hmm_emit.bin"

I checked the actual contents of https://huggingface.co/FluidInference/kokoro-82m-coreml/tree/main/ANE-zh/assets — it only contains:

  • pinyin_phrases.bin
  • pinyin_single.bin

The three jieba_hmm_*.bin files referenced by the downloader have never been uploaded to that path.

Version history checked

This isn't a regression — I checked whether a different FluidAudio version fixes it and found it doesn't:

Suggested fix

Either:

  1. Upload jieba_hmm_start.bin, jieba_hmm_trans.bin, and jieba_hmm_emit.bin to FluidInference/kokoro-82m-coreml at ANE-zh/assets/, matching what KokoroAneConstants already expects, or
  2. If the asset was intentionally dropped/deprioritized, downgrade the log level (e.g. debug instead of warning) or skip the attempt entirely via a feature flag, so it doesn't read as an error in consuming apps' logs.

Environment

  • FluidAudio: 0.15.5 (also checked against 0.15.7 source directly)
  • Reproduced via: initializing the Mandarin (v1.1-zh) KokoroAne variant on iOS

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions