{"slug": "sound-analysis-has-no-cat-hiss-label", "title": "Sound Analysis Has No cat_hiss Label", "summary": "A developer has demonstrated that Apple's built-in Sound Analysis classifier (SNClassifySoundRequest, .version1) lacks a cat_hiss class, offering only cat_meow and cat_purr while including snake_hiss. The writeup provides a minimal Swift probe that prints knownClassifications at runtime to prove the gap, showing that close-mic hisses often return snake_hiss or junk labels and that no cat_spit or cat_growl classes exist either. The author advises treating hiss detection as out of scope for a v1 pet-audio feature unless a custom Core ML model is trained.", "body_md": "Apple's built-in Sound Analysis model can label `cat_meow` and `cat_purr`. It has no `cat_hiss` class. Point a mic at a real hiss and you often get silence, a generic `cat` hit, or — worse — `snake_hiss`. Energy metering only proves something crossed a loudness line. Neither path answers why the cat hissed, and neither path is a finished pet feature.\n\nThis piece is for the iOS engineer who already knows they will call `SNClassifySoundRequest`, not for the owner Googling \"cat hissing\" after a carrier scare. Search intent on that phrase is domain research. Your shipping problem is narrower: the public label list stops at meow and purr.\n\nYou are building a pet-audio feature. You need proof, on device, that Apple's free classifier does not cover the sound you care about. A custom Core ML model can invent classes. The stock Sound Analysis path sits one step before that decision — and that is where the gap lives.\n\nIf your product brief says \"detect cat sounds,\" treat hiss as out of scope for `.version1` until you have printed the live class list yourself. Do not ship UI that assumes a missing identifier will appear under a different name.\n\nYou do not need a production recorder to learn the hard limit. You need one finished audio file of a real hiss (or a short take you already recorded) and a read of `knownClassifications` on the OS you ship.\n\nMinimal check — not a day-one product scaffold:\n\n``` python\nimport SoundAnalysis\n\nfunc proveCatHissGap(on url: URL) throws {\n    let request = try SNClassifySoundRequest(classifierIdentifier: .version1)\n\n    // Gap-proof at runtime — do not hardcode a blog dump:\n    print(\"has cat_hiss?\", request.knownClassifications.contains(\"cat_hiss\"))\n    print(\"has snake_hiss?\", request.knownClassifications.contains(\"snake_hiss\"))\n    print(\"has cat_meow?\", request.knownClassifications.contains(\"cat_meow\"))\n    print(\"has cat_purr?\", request.knownClassifications.contains(\"cat_purr\"))\n\n    let analyzer = try SNAudioFileAnalyzer(url: url)\n    let observer = LabelProbe()\n    try analyzer.add(request, withObserver: observer)\n    analyzer.analyze()\n    observer.top.prefix(8).forEach { print($0.0, String(format: \"%.2f\", $0.1)) }\n}\n\nfinal class LabelProbe: NSObject, SNResultsObserving {\n    var top: [(String, Double)] = []\n\n    func request(_ request: SNRequest, didProduce result: SNResult) {\n        guard let r = result as? SNClassificationResult else { return }\n        top.append(contentsOf: r.classifications.prefix(5).map {\n            ($0.identifier, $0.confidence)\n        })\n    }\n\n    func request(_ request: SNRequest, didFailWithError error: Error) {\n        print(\"SoundAnalysis error:\", error.localizedDescription)\n    }\n}\n```\n\nThat is enough to falsify the assumption. You are not copying a production AAC gate, a Documents move race, or a permission dance into a tutorial that pretends to be the feature. Those belong in your app's recorder once you decide classification is still worth calling.\n\nWhat the printout should show on `.version1`: `cat_hiss` is absent; `snake_hiss` is present; `cat_meow` / `cat_purr` are present. The animal block jumps from domestic cat labels into other species. There is no `cat_spit` and no `cat_growl` in the public list either.\n\nAfter a few live takes, patterns repeat even when your recorder code differs from mine:\n\n| Clip | Typical top label | \n|---|---|\n| Close meow | `cat_meow` with usable confidence | \n| Steady purr | `cat_purr` | \n| Angry hiss, farther away | silence / weak generic `cat` | \n| Angry hiss, close mic | often `snake_hiss` or junk | \n| Non-cat broadband noise | trips \"something happened,\" not \"cat\" | \n\nApple documents that you should read confidence with `classification(forIdentifier:)` and pick your own threshold (WWDC21 samples use **0.5**). Raising the bar to **0.7** cleans false positives. It does not invent a missing class.\n\n`snake_hiss` shows up\nBroadband turbulent airflow looks similar across species to a general audio model. Confidence of **0.3–0.6** on `snake_hiss` for a cat is a category collision, not a biology claim. Drop any owner-facing string that would surface that identifier. Logging it in debug is fine; shipping it in a toast is not.\n\nIf you meter while recording, you only learn that energy crossed a tripwire. A common on-device habit is polling `averagePower` on the order of a few times per second and treating values above roughly **−40 dBFS** as \"had sound.\" That filter saves empty files and battery. It does not tell you the animal, the affect, or the missing class name.\n\nTune only after you have lived with the room: **−35** is stricter and misses soft hisses; **−50** grabs fridge hum. Log a kitchen baseline before you treat any threshold as sacred. Permission denied still fails earlier than any of this — Settings → Privacy & Security → Microphone for your target — and `NSMicrophoneUsageDescription` must exist or the first record call is dead on arrival. Deployment target for the Sound Analysis path you care about here is **iOS 16+**.\n\nNone of that metering detail is the product. It is hygiene around a classifier that still cannot say `cat_hiss`.\n\nWhen the file path works, you own two things: a clip on disk and a string label (or a ranked list of them). You still do not know whether the hiss meant pain, a new dog in the hallway, or \"stop petting.\" Behaviorists read hissing as a distance-increasing warning — fear or stress more often than pure attack — but that reading needs eyes on ears, tail, and pupils, not a 44.1 kHz buffer. Sound Analysis will not write that sentence.\n\nShipping a custom Core ML sound model is the usual next *engineering* move if your requirement is a dedicated `cat_hiss` class under your own control. Budget **weeks**, not an afternoon: labeled hiss clips, background rejection, on-device size, and App Review scrutiny if copy drifts into animal-health claims. Most teams stop at \"we detected a loud event\" and leave meaning somewhere else.\n\nThat \"somewhere else\" is the real product boundary. Classification ends at a label. Owner-facing sense — a short line that treats the moment as playable, not clinical — is a separate experience layer. It is not a memo app plus a veterinary article tab, and it is not a weekend DIY classifier with a confidence slider.\n\nIf your job is to prove Apple's free model cannot name a cat hiss, you are done when `knownClassifications.contains(\"cat_hiss\")` prints `false` and a few live takes show silence, weak `cat`, or `snake_hiss`. Do not keep pasting recorder + analyzer + UI copy until the tutorial has rebuilt a pet app.\n\nIf your job is to give a cat owner something after the waveform, you leave the classifier at the edge and hand the moment to a layer that was built for that handoff. On iPhone, [Cat Translator](https://mycattranslator.com/blog/cat-hissing) is that adjacent edge: record the hiss, get a playful line back, without training your own Core ML sound model and without turning the screen into a clinical aggression guide. The classifier problem stays a classifier problem. The meaning problem stays an experience problem.\n\nThat split is the honest shipping story. Sound Analysis gives you a label when a class exists. For hiss, the class does not exist. Pretending metering + `.version1` closes the owner loop is how products ship `snake_hiss` into a living room.\n\n`knownClassifications` printed on the OS you ship`cat_hiss` confirmed absent; `cat_meow` / `cat_purr` noted\nAs of `SNClassifierIdentifier.version1` (the built-in identifier Apple documents for `SNClassifySoundRequest`), the known label list includes `cat_meow` and `cat_purr` but not `cat_hiss`. Always print `knownClassifications` on the OS you ship; do not trust a mirrored label dump from 2021 alone.\n\nSame broadband turbulence family, different animal. Treat mid confidence on `snake_hiss` as collision evidence for your gap report, not as a fact to show a pet owner.\n\nNo. A looser gate stores more files, including HVAC. You still lack `cat_hiss`. Thresholds manage silence; they do not extend the ontology.\n\n`averagePower` in dBFS?\nYes. `0` is full scale. Typical speech sits around −20 to −30. Room tone often sits near −50 to −60. That is why a mid-negative tripwire means \"energy moved,\" not \"cat hissed.\"\n\n`SNAudioStreamAnalyzer` instead of a file?\nUse the file probe first so permission, encoding, and labeling failures stay separable. Stream once the gap is proven and you still have a reason to listen continuously — knowing continuous listening will not create the missing class either.\n\nOnly if you need a first-party `cat_hiss` label under your model card. If you need an owner-facing line after a hiss, that is outside classification. Build or buy the experience layer; do not force Sound Analysis to narrate intent it cannot see.", "url": "https://wpnews.pro/news/sound-analysis-has-no-cat-hiss-label", "canonical_source": "https://dev.to/kruhlova/sound-analysis-has-no-cathiss-label-974", "published_at": "2026-09-18 17:24:50+00:00", "updated_at": "2026-09-18 17:52:59.143863+00:00", "lang": "en", "topics": ["machine-learning", "ai-tools", "developer-tools"], "entities": ["Apple", "Sound Analysis", "Core ML", "SNClassifySoundRequest", "SNAudioFileAnalyzer", "WWDC21"], "alternates": {"html": "https://wpnews.pro/news/sound-analysis-has-no-cat-hiss-label", "markdown": "https://wpnews.pro/news/sound-analysis-has-no-cat-hiss-label.md", "text": "https://wpnews.pro/news/sound-analysis-has-no-cat-hiss-label.txt", "jsonld": "https://wpnews.pro/news/sound-analysis-has-no-cat-hiss-label.jsonld"}}