--- license: apache-2.0 base_model: neuphonic/neucodec tags: - coreml - audio - speech - codec - ios - mlpackage --- # neucodec-coreml-decoder CoreML (.mlpackage) conversion of [NeuCodec](https://huggingface.co/neuphonic/neucodec) decoder by Neuphonic. Converts flat FSQ codes to 24kHz audio. Supports iOS 16+ / macOS 13+. ## Files | File | Tokens | Duration | |------|--------|----------| | `neucodec_decoder_seq50.mlpackage` | 50 | 1s | | `neucodec_decoder_seq100.mlpackage` | 100 | 2s | | `neucodec_decoder_seq250.mlpackage` | 250 | 5s | ## I/O - **Input** `codes`: shape `(1, 1, L)` Int32, flat FSQ indices 0-65535 at 50 tok/sec - **Output** `audio`: shape `(1, 1, T)` Float32 at 24kHz ## Swift Usage ```swift import CoreML let config = MLModelConfiguration() config.computeUnits = .cpuAndGPU let model = try MLModel(contentsOf: compiledURL, configuration: config) let codesArray = try MLMultiArray(shape: [1, 1, 100], dataType: .int32) for i in 0..<100 { codesArray[i] = NSNumber(value: flatCode) } let input = try MLDictionaryFeatureProvider(dictionary: ["codes": codesArray]) let output = try await model.prediction(from: input) // output["audio"]: shape [1, 1, T], Float32 at 24kHz ``` ## Source [neuphonic/neucodec](https://huggingface.co/neuphonic/neucodec) — Apache 2.0