--- license: mit tags: - audio - pitch-estimation - crepe - core-ai - apple-silicon - macos library_name: swift-pitch-tracker --- # tune-crepe — CREPE for Core AI (macOS 27) CREPE (Kim, Salamon, Li and Bello, "CREPE: A Convolutional Representation for Pitch Estimation", ICASSP 2018; MIT) exported to Apple Core AI `.aimodel` assets for on-device pitch tracking. The weights are the original Keras ones via [torchcrepe](https://github.com/maxrmorrison/torchcrepe) (Max Morrison, MIT). Read by [swift-pitch-tracker](https://github.com/arraypress/swift-pitch-tracker) and the [`tune`](https://github.com/arraypress/swift-tune-cli) command-line tool. ## Files | Path | What | |---|---| | `tune-crepe-full-float32.aimodel/` | The paper's model, 22 M parameters, 89 MB. `frames [256, 1024]` → `activations [256, 360]`. | | `tune-crepe-tiny-float32.aimodel/` | The small model, 0.5 M parameters, 2 MB. Same shapes. | Input: 1024-sample frames of 16 kHz audio, each normalised to zero mean and unit (biased) standard deviation, as `crepe.core.get_activation` builds them (centre zero-pad 512, hop 160). Output: sigmoid activations over 360 bins 20 cents apart from 1997.38 cents above 10 Hz. Decoding (local average around the argmax, or Viterbi) is the host's, reproducing `marl/crepe`. ## Fidelity The exported network matches the original Keras `crepe` at 145–151 dB PSNR on the activations (argmax identical); on Core AI it runs at 141–145 dB (full) and 145 dB (tiny) against torchcrepe; whole clips decode to within 0.001 cents of `crepe.predict`. ## Use ```sh hf download arraypress/tune-crepe --local-dir models tune model install models tune bass_01.wav # E1 −4 cents ``` Requires macOS 27 (Core AI) on Apple silicon. Converted with coreai-torch 0.4.2 / torch 2.13.