google / google/visqol

ModuleNotFoundError

Open
#124 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
928
Forks
144
PR merge metrics
No merged PRs in 30d

Description

I installed the visqol in my project virtual environment, and when running the following code in the project virtual environment, I encountered an error of "ModulaNotFoundError: No module named src". What could be the cause of this and how can I solve it? I'm looking forward to your reply. Thank you.
`
def eval_visqol(clean_ref, noisy_deg, sr):
model_path = "./visqol_models/libsvm_nu_svr_model.txt"
try:
config = visqol_config_pb2.VisqolConfig()
config.audio.sample_rate = sr
config.options.svr_model_path = model_path

api = visqol_lib_py.VisqolApi()
api.Create(config)
similarity_result = api.Measure(clean_ref, noisy_deg)
visqol_score = similarity_result.moslqo
except:
visqol_score = -1

return visqol_score

if __name__ == '__main__':
REF_FILE = 'origin.wav'
DEG_FILE = '/denoising.wav'

import librosa

ref, _ = librosa.load(REF_FILE, sr=48000, dtype=np.float64)
deg, _ = librosa.load(DEG_FILE, sr=48000, dtype=np.float64)

score = eval_visqol(ref, deg, 48000)
print(f'score: {score}')
`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.