    output_audio_tokens = model.generate(
        text_tokens,
        attention_mask=attention_mask,
        max_new_tokens=max_seq_length,
        repetition_penalty=1.1,

        num_beams=5,
        no_repeat_ngram_size=3,
    )
    audio_signal = decode_tts(output_audio_tokens[0], quantizer, 3, len(tokenizer), soa, eoa)
    return audio_signal
