please provide a bool status of if it generating or not and make it public so it can both be referenced and seen in the inspector ty! provide full script fixed

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.Networking;

public class ACEStepRuntimeInference : MonoBehaviour
{
    [Header("Server Settings")]
    [Tooltip("Base URL of the inference server (no trailing slash)")]
    public string serverBaseUrl = "http://localhost:8000";

    [Header("Input Parameters")]

    public string checkpoint_path = "default_checkpoint.pt";

    public bool bf16 = true;
    public bool torch_compile = false;
    public int device_id = 0;

    [Tooltip("Ignored by server")]
    public string output_path = ""; // We will not use, but kept for completeness

    public float audio_duration = 10f;

    [TextArea(2, 5)]
    public string prompt = "This is a sample prompt.";

    [TextArea(2, 5)]
    public string lyrics = "";

    public int infer_step = 50;

    public float guidance_scale = 7.5f;

    public string scheduler_type = "default";

    public string cfg_type = "default";

    public float omega_scale = 1.0f;

    [Tooltip("Seeds for random generator")]
    public List<int> actual_seeds = new List<int> { 42 };

    public float guidance_interval = 1.0f;

    public float guidance_interval_decay = 0.0f;

    public float min_guidance_scale = 0.0f;

    public bool use_erg_tag = false;
    public bool use_erg_lyric = false;
    public bool use_erg_diffusion = false;

    [Tooltip("OSS steps")]
    public List<int> oss_steps = new List<int> { 1, 2, 3 };

    public float guidance_scale_text = 0.0f;
    public float guidance_scale_lyric = 0.0f;

    [Header("Output")]
    [Tooltip("Local folder to save downloaded audio")]
    public string localSaveFolder;

    [Header("Generation Result")]
    [Tooltip("AudioClip loaded from the generated audio file")]
    public AudioClip GenerationResult;

    private ACEStepClient client;

    void Awake()
    {
        if (string.IsNullOrEmpty(localSaveFolder))
        {
            localSaveFolder = Path.Combine(Application.persistentDataPath, "GeneratedAudio");
        }

        client = GetComponent<ACEStepClient>();
        if (client == null)
        {
            client = gameObject.AddComponent<ACEStepClient>();
        }
        client.serverBaseUrl = serverBaseUrl;
    }

    [ContextMenu("Start Generate Audio")]
    public void StartGenerate()
    {
        ACEStepInput input = BuildACEStepInput();

        client.GenerateAudio(input, OnGenerateSuccess, OnGenerateError);
    }

    private ACEStepInput BuildACEStepInput()
    {
        return new ACEStepInput()
        {
            checkpoint_path = checkpoint_path,
            bf16 = bf16,
            torch_compile = torch_compile,
            device_id = device_id,
            output_path = output_path,
            audio_duration = audio_duration,
            prompt = prompt,
            lyrics = lyrics,
            infer_step = infer_step,
            guidance_scale = guidance_scale,
            scheduler_type = scheduler_type,
            cfg_type = cfg_type,
            omega_scale = omega_scale,
            actual_seeds = new List<int>(actual_seeds),
            guidance_interval = guidance_interval,
            guidance_interval_decay = guidance_interval_decay,
            min_guidance_scale = min_guidance_scale,
            use_erg_tag = use_erg_tag,
            use_erg_lyric = use_erg_lyric,
            use_erg_diffusion = use_erg_diffusion,
            oss_steps = new List<int>(oss_steps),
            guidance_scale_text = guidance_scale_text,
            guidance_scale_lyric = guidance_scale_lyric,
        };
    }

    private void OnGenerateSuccess(ACEStepOutput output)
    {
        Debug.Log("Generation success! Output path: " + output.output_path);

        if (string.IsNullOrEmpty(output.output_path))
        {
            Debug.LogWarning("Output path from server is empty");
            SetFilePathText("No output file returned from server");
            return;
        }

        StartCoroutine(client.DownloadAndSaveAudio(output.output_path, localSaveFolder, OnDownloadComplete, OnDownloadError));
    }

    private void OnGenerateError(string error)
    {
        Debug.LogError("Generation failed: " + error);
        SetFilePathText("Generation failed: " + error);
    }

    private void OnDownloadComplete(string localFullPath)
    {
        Debug.Log("Download and save completed: " + localFullPath);
        SetFilePathText(localFullPath);
    }

    private void OnDownloadError(string error)
    {
        Debug.LogError("Download failed: " + error);
        SetFilePathText("Download failed: " + error);
    }

    private void SetFilePathText(string text)
    {
        // If the path is a valid existing file, try to load it as an AudioClip
        if (!string.IsNullOrEmpty(text) && File.Exists(text))
        {
            StartCoroutine(LoadAudioClipFromFile(text));
        }
        else
        {
            // Clear the audio clip if path invalid or error message
            GenerationResult = null;
        }
    }

    private IEnumerator LoadAudioClipFromFile(string filePath)
    {
        if (!File.Exists(filePath))
        {
            Debug.LogError($"Audio file not found on disk: {filePath}");
            GenerationResult = null;
            yield break;
        }

        string uri = "file://" + filePath;

        AudioType audioType = GetAudioTypeFromFileExtension(filePath);

        using (UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip(uri, audioType))
        {
            yield return www.SendWebRequest();

#if UNITY_2020_1_OR_NEWER
            bool isError = www.result == UnityWebRequest.Result.ConnectionError || www.result == UnityWebRequest.Result.ProtocolError;
#else
            bool isError = www.isNetworkError || www.isHttpError;
#endif
            if (isError)
            {
                Debug.LogError($"Failed to load audio clip from file: {www.error}");
                GenerationResult = null;
            }
            else
            {
                AudioClip clip = DownloadHandlerAudioClip.GetContent(www);
                if (clip == null)
                {
                    Debug.LogError("Loaded AudioClip is null");
                    GenerationResult = null;
                }
                else
                {
                    Debug.Log($"AudioClip loaded successfully from {filePath}");
                    GenerationResult = clip;
                }
            }
        }
    }

    private AudioType GetAudioTypeFromFileExtension(string filePath)
    {
        string extension = Path.GetExtension(filePath).ToLowerInvariant();
        switch (extension)
        {
            case ".wav": return AudioType.WAV;
            case ".mp3": return AudioType.MPEG;
            case ".ogg": return AudioType.OGGVORBIS;
            case ".aiff": return AudioType.AIFF;
            case ".mod": return AudioType.MOD;
            case ".xm": return AudioType.XM;
            case ".it": return AudioType.IT;
            case ".s3m": return AudioType.S3M;
            default:
                Debug.LogWarning($"Unknown audio file extension '{extension}', defaulting to WAV");
                return AudioType.WAV;
        }
    }
}