Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError #124

Open
Blakey-Gavin opened this issue Sep 29, 2024 · 1 comment
Open

ModuleNotFoundError #124

Blakey-Gavin opened this issue Sep 29, 2024 · 1 comment

Comments

@Blakey-Gavin
Copy link

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}')

`

@Blakey-Gavin
Copy link
Author

Thank you very much for your prompt reply, but it may not be very effective as I am using Visqol on Ubuntu 20.04.

@github-staff github-staff deleted a comment Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant