make this to where it dosnt time out return full send. using System; using…
Private research annotation
Sign in to add a private research label or note.
- User
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 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 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;
code - Assistant
To prevent timeout when the server takes a long time to generate audio, you can increase the
HttpClient.Timeoutvalue or disable it (set toTimeout.InfiniteTimeSpan).
Also, if the server supports chunked or streamed responses, you might want to handle the response stream incrementally. But from your current code and typical HTTP POST patterns, increasing the timeout is usually enough.Below is your
ACEStepClientclass modified to disable HttpClient timeout to avoid any request timing out prematurely: - User
send full script fixed
- Assistant