make this to where it dosnt time out return full send.

using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

[Serializable]
public class ACEStepInput
{
    public string checkpoint_path { get; set; }
    public bool bf16 { get; set; } = true;
    public bool torch_compile { get; set; } = false;
    public int device_id { get; set; } = 0;
    public string output_path { get; set; }
    public float audio_duration { get; set; }
    public string prompt { get; set; }
    public string lyrics { get; set; }
    public int infer_step { get; set; }
    public float guidance_scale { get; set; }
    public string scheduler_type { get; set; }
    public string cfg_type { get; set; }
    public float omega_scale { get; set; }
    public List<int> actual_seeds { get; set; }
    public float guidance_interval { get; set; }
    public float guidance_interval_decay { get; set; }
    public float min_guidance_scale { get; set; }
    public bool use_erg_tag { get; set; }
    public bool use_erg_lyric { get; set; }
    public bool use_erg_diffusion { get; set; }
    public List<int> oss_steps { get; set; }
    public float guidance_scale_text { get; set; } = 0.0f;
    public float guidance_scale_lyric { get; set; } = 0.0f;
}

[Serializable]
public class ACEStepOutput
{
    public string status { get; set; }
    public string output_path { get; set; }  // path received from server, e.g. "files/output_abc.wav"
    public string message { get; set; }
}

public class ACEStepClient : IDisposable
{
    private readonly HttpClient _httpClient;
    private readonly string _serverBaseUrl;

    public ACEStepClient(string serverBaseUrl = "http://localhost:8000")
    {
        _serverBaseUrl = serverBaseUrl?.TrimEnd('/') ?? throw new ArgumentNullException(nameof(serverBaseUrl));
        _httpClient = new HttpClient();
    }

    /// <summary>
    /// Start generation request asynchronously.
    /// </summary>
    public async Task<ACEStepOutput> GenerateAudioAsync(ACEStepInput input)
    {
        if (input == null) throw new ArgumentNullException(nameof(input));

        string url = $"{_serverBaseUrl}/generate";
        string jsonData = JsonSerializer.Serialize(input);
        var content = new StringContent(jsonData, Encoding.UTF8, "application/json");

        HttpResponseMessage response;
        try
        {
            response = await _httpClient.PostAsync(url, content).ConfigureAwait(false);
        }
        catch (Exception ex)
        {
            throw new HttpRequestException("Error sending request", ex);
        }

        if (!response.IsSuccessStatusCode)
        {
            string errorContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
            throw new HttpRequestException($"Server returned error: {response.StatusCode} - {errorContent}");
        }

        string responseBody = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

        ACEStepOutput output;
        try
        {
            output = JsonSerializer.Deserialize<ACEStepOutput>(responseBody,
                new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
        }
        catch (Exception e)
        {
            throw new Exception($"Error parsing response: {e.Message}");
        }

        if (output == null)
        {
            throw new Exception("Failed to deserialize server response.");
        }

        if (output.status != "success")
        {
            throw new Exception($"Server returned error: {output.message}");
        }

        return output;
    }

    /// <summary>
    /// Downloads audio file given the server path (including possible folders) and saves it inside the given output folder using only the filename.
    /// </summary>
    /// <param name="serverFilePath">File path from server response (e.g. "files/output_abc.wav")</param>
    /// <param name="outputFolder">Local folder path to save the file</param>
    /// <returns>Full local path to saved file</returns>
    public async Task<string> DownloadAndSaveAudioAsync(string serverFilePath, string outputFolder)
    {
        if (string.IsNullOrWhiteSpace(serverFilePath))
            throw new ArgumentException("Empty serverFilePath specified", nameof(serverFilePath));
        if (string.IsNullOrWhiteSpace(outputFolder))
            throw new ArgumentException("Empty output folder path specified", nameof(outputFolder));

        string downloadUrl = $"{_serverBaseUrl}/{serverFilePath.TrimStart('/')}";

        HttpResponseMessage response;
        try
        {
            response = await _httpClient.GetAsync(downloadUrl).ConfigureAwait(false);
        }
        catch (Exception ex)
        {
            throw new HttpRequestException("Error downloading audio file", ex);
        }

        if (!response.IsSuccessStatusCode)
        {
            string errorContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
            throw new HttpRequestException($"Error downloading audio file: {response.StatusCode} - {errorContent}");
        }

        byte[] audioData = await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false);

        if (!Directory.Exists(outputFolder))
        {
            Directory.CreateDirectory(outputFolder);
        }

        // Use only the filename portion for saving locally, strip directories
        string fileName = Path.GetFileName(serverFilePath);
        string localPath = Path.Combine(outputFolder, fileName);

        try
        {
            await File.WriteAllBytesAsync(localPath, audioData).ConfigureAwait(false);
        }
        catch (Exception e)
        {
            throw new IOException($"Failed to save audio file: {e.Message}", e);
        }

        return localPath;
    }

    public void Dispose()
    {
        _httpClient?.Dispose();
    }
}