fixed another tts bug, clblast selection and quiet mode

This commit is contained in:
Concedo 2025-01-22 21:36:13 +08:00
parent 1cb9805024
commit 0e74db7fd4
4 changed files with 49 additions and 45 deletions

View file

@ -152,9 +152,10 @@ static std::vector<float> embd_to_audio(
const int n_codes,
const int n_embd,
const int n_thread) {
const int n_hop = 600;
const int n_fft = n_hop*4; //its 1280 at 320, or 2400 at 600
const int n_win = n_hop*4;
const int n_fft = 1280; //its 1280 at 320, or 2400 at 600
const int n_hop = 320;
const int n_win = 1280;
const int n_pad = (n_win - n_hop)/2;
const int n_out = (n_codes - 1)*n_hop + n_win;
@ -622,7 +623,7 @@ tts_generation_outputs ttstype_generate(const tts_generation_inputs inputs)
{
audio_seed = (((uint32_t)time(NULL)) % 1000000u);
}
if(ttsdebugmode==1)
if(ttsdebugmode==1 && !inputs.quiet)
{
printf("\nUsing Speaker Seed: %d", speaker_seed);
printf("\nUsing Audio Seed: %d", audio_seed);
@ -638,13 +639,12 @@ tts_generation_outputs ttstype_generate(const tts_generation_inputs inputs)
&& last_generated_audio!=""
&& last_generation_settings_prompt == std::string(inputs.prompt))
{
if(ttsdebugmode==1 || !inputs.quiet)
{
if (ttsdebugmode == 1 && !inputs.quiet) {
printf("\nReusing Cached Audio.\n");
output.data = last_generated_audio.c_str();
output.status = 1;
return output;
}
output.data = last_generated_audio.c_str();
output.status = 1;
return output;
}