ONNX
kashif HF staff commited on
Commit
367eb6e
1 Parent(s): 5ab145e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -0
README.md CHANGED
@@ -26,3 +26,23 @@ If you use it, please consider citing:
26
 
27
  ## Example Use
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  ## Example Use
28
 
29
+ ```python
30
+ from diffusers import OnnxRuntimeModel
31
+
32
+
33
+ SAMPLE_RATE = 16000
34
+ N_FFT = 1024
35
+ HOP_LENGTH = 320
36
+ WIN_LENGTH = 640
37
+ N_MEL_CHANNELS = 128
38
+ MEL_FMIN = 0.0
39
+ MEL_FMAX = int(SAMPLE_RATE // 2)
40
+ CLIP_VALUE_MIN = 1e-5
41
+ CLIP_VALUE_MAX = 1e8
42
+
43
+ mel = ...
44
+
45
+ melgan = OnnxRuntimeModel.from_pretrained("kashif/soundstream_mel_decoder")
46
+
47
+ audio = melgan(input_features=mel.astype(np.float32))
48
+ ```