voice-changer/server/voice_changer/RVC/pitchExtractor/onnxcrepe/session.py

10 lines
374 B
Python
Raw Normal View History

import os
import onnxruntime as ort
class CrepeInferenceSession(ort.InferenceSession):
def __init__(self, model='full', sess_options=None, providers=None, provider_options=None, **kwargs):
model_path = os.path.join(os.path.dirname(__file__), 'assets', f'{model}.onnx')
super().__init__(model_path, sess_options, providers, provider_options, **kwargs)