wav2vec2mos / README.md
selectorrrr's picture
Update README.md
843a883 verified
|
raw
history blame
294 Bytes
metadata
license: apache-2.0
import onnxruntime as ort
import librosa
import numpy as np

sess = ort.InferenceSession("wav2vec2mos.onnx")
x = signal[np.newaxis, :].astype(np.float32)
outs = sess.run(None, {"input_values": x})
mos = float(outs[0].reshape(-1).mean())

print("MOS:", mos)