aoiandroid commited on
Commit
5601b89
·
verified ·
1 Parent(s): e8c7d4e

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +50 -0
README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: neuphonic/neucodec
4
+ tags:
5
+ - coreml
6
+ - audio
7
+ - speech
8
+ - codec
9
+ - ios
10
+ - mlpackage
11
+ ---
12
+
13
+ # neucodec-coreml-decoder
14
+
15
+ CoreML (.mlpackage) conversion of [NeuCodec](https://huggingface.co/neuphonic/neucodec) decoder by Neuphonic.
16
+
17
+ Converts flat FSQ codes to 24kHz audio. Supports iOS 16+ / macOS 13+.
18
+
19
+ ## Files
20
+
21
+ | File | Tokens | Duration |
22
+ |------|--------|----------|
23
+ | `neucodec_decoder_seq50.mlpackage` | 50 | 1s |
24
+ | `neucodec_decoder_seq100.mlpackage` | 100 | 2s |
25
+ | `neucodec_decoder_seq250.mlpackage` | 250 | 5s |
26
+
27
+ ## I/O
28
+
29
+ - **Input** `codes`: shape `(1, 1, L)` Int32, flat FSQ indices 0-65535 at 50 tok/sec
30
+ - **Output** `audio`: shape `(1, 1, T)` Float32 at 24kHz
31
+
32
+ ## Swift Usage
33
+
34
+ ```swift
35
+ import CoreML
36
+
37
+ let config = MLModelConfiguration()
38
+ config.computeUnits = .cpuAndGPU
39
+ let model = try MLModel(contentsOf: compiledURL, configuration: config)
40
+
41
+ let codesArray = try MLMultiArray(shape: [1, 1, 100], dataType: .int32)
42
+ for i in 0..<100 { codesArray[i] = NSNumber(value: flatCode) }
43
+ let input = try MLDictionaryFeatureProvider(dictionary: ["codes": codesArray])
44
+ let output = try await model.prediction(from: input)
45
+ // output["audio"]: shape [1, 1, T], Float32 at 24kHz
46
+ ```
47
+
48
+ ## Source
49
+
50
+ [neuphonic/neucodec](https://huggingface.co/neuphonic/neucodec) — Apache 2.0