Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
---
|
4 |
+
|
5 |
+
```
|
6 |
+
import onnxruntime as ort
|
7 |
+
import librosa
|
8 |
+
import numpy as np
|
9 |
+
|
10 |
+
sess = ort.InferenceSession("wav2vec2mos.onnx")
|
11 |
+
x = signal[np.newaxis, :].astype(np.float32)
|
12 |
+
outs = sess.run(None, {"input_values": x})
|
13 |
+
mos = float(outs[0].reshape(-1).mean())
|
14 |
+
|
15 |
+
print("MOS:", mos)
|
16 |
+
```
|