t3_inference

Run T3 inference to generate speech tokens

Description

Run T3 inference to generate speech tokens

Usage

 1t3_inference(
 2  model,
 3  cond,
 4  text_tokens,
 5  max_new_tokens = 1000,
 6  temperature = 0.8,
 7  cfg_weight = 0.5,
 8  top_p = 0.95,
 9  min_p = 0.05,
10  repetition_penalty = 1.2
11)

Arguments

  • model: T3 model
  • cond: T3 conditioning
  • text_tokens: Tokenized text (tensor)
  • max_new_tokens: Maximum speech tokens to generate
  • temperature: Sampling temperature
  • cfg_weight: Classifier-free guidance weight
  • top_p: Nucleus sampling threshold
  • min_p: Minimum probability threshold
  • repetition_penalty: Repetition penalty

Value

Generated speech tokens