make me a c# class that inferences into this uvicorn server name it SplitterClass don't forget any properties and important things

import os
import sys
import torch
import logging
import yt_dlp
import json
import copy
import spaces
import gradio as gr
import urllib.parse
import assets.themes.loadThemes as loadThemes
from audio_separator.separator import Separator
from assets.i18n.i18n import I18nAuto
from assets.presence.discord_presence import RPCManager, track_presence

import uvicorn
from fastapi import FastAPI, UploadFile, File, Form
from fastapi.responses import FileResponse, JSONResponse

i18n = I18nAuto()

now_dir = os.getcwd()
sys.path.append(now_dir)
config_file = os.path.join(now_dir, "assets", "config.json")
models_file = os.path.join(now_dir, "assets", "models.json")
default_settings_file = os.path.join(now_dir, "assets", "default_settings.json")
custom_settings_file = os.path.join(now_dir, "assets", "custom_settings.json")

device = "cuda" if torch.cuda.is_available() else "cpu"
use_autocast = device == "cuda"

out_dir = "./outputs"
models_dir = "./models"
extensions = (".wav", ".flac", ".mp3", ".ogg", ".opus", ".m4a", ".aiff", ".ac3")

mdx23c_models = [
    'MDX23C_D1581.ckpt',
    'MDX23C-8KFFT-InstVoc_HQ.ckpt',
    'MDX23C-8KFFT-InstVoc_HQ_2.ckpt',
    'MDX23C-De-Reverb-aufr33-jarredou.ckpt',
    'MDX23C-DrumSep-aufr33-jarredou.ckpt'
]

found_files = []
logs = []

def load_settings_from_file(filepath):
    try:
        with open(filepath, 'r', encoding='utf-8') as f:
            return json.load(f)
    except Exception:
        return None

def read_main_config():
    try:
        with open(config_file, "r", encoding="utf8") as f:
            return json.load(f)
    except Exception:
        return {}

def get_initial_settings():
    main_config = read_main_config()
    load_custom = main_config.get('load_custom_settings', False)

    settings_to_load = {}
    default_settings = load_settings_from_file(default_settings_file)

    if load_custom:
        custom_settings = load_settings_from_file(custom_settings_file)
        if custom_settings:
            settings_to_load = copy.deepcopy(default_settings)
            for section, params in custom_settings.items():
                if section in settings_to_load:
                    for key, value in params.items():
                        settings_to_load[section][key] = value
                else:
                    settings_to_load[section] = params
        else:
            settings_to_load = default_settings
    else:
        settings_to_load = default_settings

    return settings_to_load or {}

initial_settings = get_initial_settings()

@track_presence("Performing MDXC Separationn")
@spaces.GPU(duration=60)
def mdxc_separator(audio_path, model, out_format, segment_size, override_seg_size, overlap, batch_size, norm_thresh, amp_thresh, single_stem):
    model_path = os.path.join(models_dir, model)
    try:
        if not os.path.exists(model_path):
            # Here you can add logging or notifications about model download
            pass
        
        separator = Separator(
            log_level=logging.WARNING,
            model_file_dir=models_dir,
            output_dir=out_dir,
            output_format=out_format,
            use_autocast=use_autocast,
            normalization_threshold=norm_thresh,
            amplification_threshold=amp_thresh,
            output_single_stem=single_stem,
            mdxc_params={
                "segment_size": segment_size,
                "override_model_segment_size": override_seg_size,
                "batch_size": batch_size,
                "overlap": overlap,
            }
        )

        separator.load_model(model_filename=model)
        separation = separator.separate(audio_path)
        stems = [os.path.join(out_dir, file_name) for file_name in separation]
        if single_stem.strip():
            return stems[0], None
        return stems[0], stems[1]

    except Exception as e:
        raise RuntimeError(f"MDX23C separation failed: {e}") from e

def download_audio(url, output_dir="ytdl"):
    os.makedirs(output_dir, exist_ok=True)
    ydl_opts = {
        'format': 'bestaudio/best',
        'postprocessors': [{
            'key': 'FFmpegExtractAudio',
            'preferredcodec': 'wav',
            'preferredquality': '32',
        }],
        'outtmpl': os.path.join(output_dir, '%(title)s.%(ext)s'),
        'postprocessor_args': [
            '-acodec', 'pcm_f32le'
        ],
    }
    try:
        with yt_dlp.YoutubeDL(ydl_opts) as ydl:
            info = ydl.extract_info(url, download=False)
            video_title = info['title']
            ydl.download([url])
            file_path = os.path.join(output_dir, f"{video_title}.wav")
            if os.path.exists(file_path):
                return os.path.abspath(file_path)
            else:
                raise Exception("Something went wrong")
    except Exception as e:
        raise Exception(f"Error extracting audio with yt-dlp: {str(e)}")

app = FastAPI()

@app.post("/mdx23c/separate")
async def separate_mdx23c(
    audio: UploadFile = File(...),
    model: str = Form(...),
    output_format: str = Form(...),
    segment_size: int = Form(...),
    override_segment_size: bool = Form(...),
    overlap: int = Form(...),
    batch_size: int = Form(...),
    normalization_threshold: float = Form(...),
    amplification_threshold: float = Form(...),
    single_stem: str = Form("")
):
    try:
        # Save uploaded file temporarily
        input_path = os.path.join("temp", audio.filename)
        os.makedirs("temp", exist_ok=True)
        with open(input_path, "wb") as f:
            f.write(await audio.read())
        
        stem1, stem2 = mdxc_separator(
            audio_path=input_path,
            model=model,
            out_format=output_format,
            segment_size=segment_size,
            override_seg_size=override_segment_size,
            overlap=overlap,
            batch_size=batch_size,
            norm_thresh=normalization_threshold,
            amp_thresh=amplification_threshold,
            single_stem=single_stem,
        )

        response = {"stem1": stem1}
        if stem2:
            response["stem2"] = stem2
        
        return JSONResponse(content=response)
    except Exception as e:
        return JSONResponse(content={"error": str(e)}, status_code=500)

@app.get("/mdx23c/models")
def list_models():
    return {"models": mdx23c_models}

@app.get("/mdx23c/download_audio")
def download_audio_endpoint(url: str):
    try:
        path = download_audio(url)
        return {"audio_path": path}
    except Exception as e:
        return JSONResponse(content={"error": str(e)}, status_code=500)

if __name__ == "__main__":
    uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=False)