aufklarer commited on
Commit
8f9ba6a
·
verified ·
1 Parent(s): 8e4ece5

Document speech-swift MLX engine usage

Browse files
Files changed (1) hide show
  1. README.md +10 -3
README.md CHANGED
@@ -96,16 +96,23 @@ path (STFT → features → ERB mask + deep filtering → iSTFT), documented in
96
  [upstream repository](https://github.com/Rikorose/DeepFilterNet).
97
 
98
  On Apple devices, [speech-swift](https://github.com/soniqo/speech-swift)
99
- provides ready-made speech enhancement via the
100
- [CoreML variant](https://huggingface.co/aufklarer/DeepFilterNet3-CoreML):
 
101
 
102
  ```swift
103
  import SpeechEnhancement
104
 
105
- let enhancer = try await SpeechEnhancer.fromPretrained()
106
  let clean = try enhancer.enhance(audio: noisyAudio, sampleRate: 48000)
107
  ```
108
 
 
 
 
 
 
 
109
  ## Tensor contract
110
 
111
  Channels-last `[B, T, F, C]` — time is the conv H axis, frequency the W axis.
 
96
  [upstream repository](https://github.com/Rikorose/DeepFilterNet).
97
 
98
  On Apple devices, [speech-swift](https://github.com/soniqo/speech-swift)
99
+ runs this model directly via its MLX engine (or use the
100
+ [CoreML variant](https://huggingface.co/aufklarer/DeepFilterNet3-CoreML) for
101
+ the Neural Engine):
102
 
103
  ```swift
104
  import SpeechEnhancement
105
 
106
+ let enhancer = try await SpeechEnhancer.fromPretrained(engine: .mlx)
107
  let clean = try enhancer.enhance(audio: noisyAudio, sampleRate: 48000)
108
  ```
109
 
110
+ CLI:
111
+
112
+ ```bash
113
+ swift run speech denoise noisy.wav --engine mlx
114
+ ```
115
+
116
  ## Tensor contract
117
 
118
  Channels-last `[B, T, F, C]` — time is the conv H axis, frequency the W axis.