SYMBOL INDEX (341 symbols across 28 files) FILE: data/collation.py class TextTokenCollater (line 10) | class TextTokenCollater: method __init__ (line 29) | def __init__( method index (line 56) | def index( method __call__ (line 87) | def __call__(self, texts: List[str]) -> Tuple[torch.Tensor, torch.Tens... function get_text_token_collater (line 116) | def get_text_token_collater() -> TextTokenCollater: FILE: data/datamodule.py class _SeedWorkers (line 47) | class _SeedWorkers: method __init__ (line 48) | def __init__(self, seed: int): method __call__ (line 51) | def __call__(self, worker_id: int): function _get_input_strategy (line 55) | def _get_input_strategy(input_strategy, dataset, cuts): class TtsDataModule (line 62) | class TtsDataModule: method __init__ (line 78) | def __init__(self, args: argparse.Namespace): method add_arguments (line 82) | def add_arguments(cls, parser: argparse.ArgumentParser): method train_dataloaders (line 222) | def train_dataloaders( method valid_dataloaders (line 347) | def valid_dataloaders(self, cuts_valid: CutSet) -> DataLoader: method test_dataloaders (line 379) | def test_dataloaders(self, cuts: CutSet) -> DataLoader: method train_cuts (line 405) | def train_cuts(self) -> CutSet: method dev_cuts (line 412) | def dev_cuts(self) -> CutSet: method test_cuts (line 417) | def test_cuts(self) -> CutSet: FILE: data/dataset.py function seq2phone (line 39) | def seq2phone(tokens: Union[List, np.ndarray]): class DynamicBatchSampler (line 48) | class DynamicBatchSampler(torch.utils.data.Sampler): method __init__ (line 49) | def __init__(self, sampler, num_tokens_fn, num_buckets=100, min_size=0... method set_epoch (line 75) | def set_epoch(self, epoch): method is_batch_full (line 77) | def is_batch_full(self, num_tokens, batch): method __iter__ (line 86) | def __iter__(self): method __len__ (line 126) | def __len__(self): class AudioDataset (line 131) | class AudioDataset(torch.utils.data.Dataset): method __init__ (line 132) | def __init__(self, h5_path, ann_path, tokenizer_path): method __len__ (line 146) | def __len__(self): method get_dur (line 149) | def get_dur(self, idx): method archive (line 153) | def archive(self): method __getitem__ (line 157) | def __getitem__(self, idx): function collate (line 186) | def collate(batch): function create_dataloader (line 225) | def create_dataloader(data_dir="/root/valle/egs/mix", n_gpus=1, rank=0, ... FILE: data/fbank.py class BigVGANFbankConfig (line 29) | class BigVGANFbankConfig: method to_dict (line 43) | def to_dict(self) -> Dict[str, Any]: method from_dict (line 47) | def from_dict(data: Dict[str, Any]) -> "BigVGANFbankConfig": function dynamic_range_compression_torch (line 51) | def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): function spectral_normalize_torch (line 55) | def spectral_normalize_torch(magnitudes): class BigVGANFbank (line 62) | class BigVGANFbank(FeatureExtractor): method __init__ (line 66) | def __init__(self, config: Optional[Any] = None): method _feature_fn (line 80) | def _feature_fn(self, samples, **kwargs): method extract (line 133) | def extract( method frame_shift (line 150) | def frame_shift(self) -> Seconds: method feature_dim (line 153) | def feature_dim(self, sampling_rate: int) -> int: method mix (line 157) | def mix( method compute_energy (line 172) | def compute_energy(features: np.ndarray) -> float: function get_fbank_extractor (line 176) | def get_fbank_extractor() -> BigVGANFbank: FILE: data/input_strategies.py class PromptedFeatures (line 16) | class PromptedFeatures: method __init__ (line 17) | def __init__(self, prompts, features): method to (line 21) | def to(self, device): method sum (line 26) | def sum(self): method ndim (line 30) | def ndim(self): method data (line 34) | def data(self): FILE: data/tokenizer.py function remove_encodec_weight_norm (line 33) | def remove_encodec_weight_norm(model): class AudioTokenizer (line 63) | class AudioTokenizer: method __init__ (line 66) | def __init__( method device (line 89) | def device(self): method encode (line 92) | def encode(self, wav: torch.Tensor) -> torch.Tensor: method decode (line 95) | def decode(self, frames: torch.Tensor) -> torch.Tensor: function tokenize_audio (line 99) | def tokenize_audio(tokenizer: AudioTokenizer, audio): FILE: launch-ui.py function clear_prompts (line 125) | def clear_prompts(): function transcribe_one (line 138) | def transcribe_one(model, audio_path): function make_npz_prompt (line 162) | def make_npz_prompt(name, uploaded_audio, recorded_audio, transcript_con... function make_prompt (line 203) | def make_prompt(name, wav, sr, save=True): function infer_from_audio (line 230) | def infer_from_audio(text, language, accent, audio_prompt, record_audio_... function infer_from_prompt (line 309) | def infer_from_prompt(text, language, accent, preset_prompt, prompt_file): function infer_long_text (line 371) | def infer_long_text(text, preset_prompt, prompt=None, language='auto', a... function main (line 511) | def main(): FILE: models/__init__.py function add_model_arguments (line 18) | def add_model_arguments(parser: argparse.ArgumentParser): function get_model (line 98) | def get_model(params) -> nn.Module: FILE: models/transformer.py class Transformer (line 41) | class Transformer(nn.Module): method __init__ (line 47) | def __init__( method forward (line 222) | def forward( method inference (line 320) | def inference( method visualize (line 387) | def visualize( FILE: models/vallex.py class Transpose (line 39) | class Transpose(nn.Identity): method forward (line 42) | def forward(self, input: torch.Tensor) -> torch.Tensor: class VALLF (line 50) | class VALLF(nn.Module): method __init__ (line 55) | def __init__( method stage_parameters (line 266) | def stage_parameters(self, stage: int = 1) -> Iterator[nn.Parameter]: method stage_named_parameters (line 280) | def stage_named_parameters( method pad_y_eos (line 294) | def pad_y_eos(self, y, y_mask_int, eos_id): method _prepare_prompts (line 307) | def _prepare_prompts(self, y, y_lens, codes, nar_stage, y_prompts_code... method forward (line 367) | def forward( method inference (line 379) | def inference( method visualize (line 390) | def visualize( class VALLE (line 400) | class VALLE(VALLF): method __init__ (line 405) | def __init__( method forward (line 447) | def forward( method inference (line 458) | def inference( method continual (line 688) | def continual( function top_k_top_p_filtering (line 791) | def top_k_top_p_filtering( function topk_sampling (line 836) | def topk_sampling(logits, top_k=10, top_p=1.0, temperature=1.0): FILE: models/visualizer.py function visualize (line 26) | def visualize( FILE: modules/activation.py function _in_projection_packed (line 12) | def _in_projection_packed( function _scaled_dot_product_attention (line 67) | def _scaled_dot_product_attention( function multi_head_attention_forward (line 114) | def multi_head_attention_forward( class MultiheadAttention (line 170) | class MultiheadAttention(Module): method __init__ (line 230) | def __init__( method _reset_parameters (line 333) | def _reset_parameters(self): method __setstate__ (line 350) | def __setstate__(self, state): method forward (line 357) | def forward( method infer (line 591) | def infer(self, FILE: modules/embedding.py class TokenEmbedding (line 21) | class TokenEmbedding(nn.Module): method __init__ (line 22) | def __init__( method weight (line 37) | def weight(self) -> torch.Tensor: method embedding (line 40) | def embedding(self, index: int) -> torch.Tensor: method forward (line 43) | def forward(self, x: torch.Tensor): class SinePositionalEmbedding (line 50) | class SinePositionalEmbedding(nn.Module): method __init__ (line 51) | def __init__( method extend_pe (line 68) | def extend_pe(self, x): method forward (line 93) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: modules/optim.py class BatchedOptimizer (line 29) | class BatchedOptimizer(Optimizer): method __init__ (line 40) | def __init__(self, params, defaults): method batched_params (line 44) | def batched_params(self, param_group, group_params_names): class ScaledAdam (line 129) | class ScaledAdam(BatchedOptimizer): method __init__ (line 172) | def __init__( method __setstate__ (line 212) | def __setstate__(self, state): method step (line 216) | def step(self, closure=None): method _init_state (line 265) | def _init_state(self, group: dict, p: Tensor, state: dict): method _get_clipping_scale (line 316) | def _get_clipping_scale( method _show_gradient_dominating_parameter (line 414) | def _show_gradient_dominating_parameter( method _step_one_batch (line 479) | def _step_one_batch( method _size_update (line 531) | def _size_update( method _step (line 598) | def _step(self, group: dict, p: Tensor, state: dict): method _step_scalar (line 639) | def _step_scalar(self, group: dict, p: Tensor, state: dict): class LRScheduler (line 664) | class LRScheduler(object): method __init__ (line 670) | def __init__(self, optimizer: Optimizer, verbose: bool = False): method state_dict (line 687) | def state_dict(self): method load_state_dict (line 699) | def load_state_dict(self, state_dict): method get_last_lr (line 708) | def get_last_lr(self) -> List[float]: method get_lr (line 712) | def get_lr(self): method step_batch (line 718) | def step_batch(self, batch: Optional[int] = None) -> None: method step_epoch (line 730) | def step_epoch(self, epoch: Optional[int] = None): method _set_lrs (line 740) | def _set_lrs(self): method print_lr (line 750) | def print_lr(self, is_verbose, group, lr): class Eden (line 759) | class Eden(LRScheduler): method __init__ (line 781) | def __init__( method get_lr (line 794) | def get_lr(self): function _test_eden (line 810) | def _test_eden(): class Eve (line 836) | class Eve(Optimizer): method __init__ (line 872) | def __init__( method __setstate__ (line 908) | def __setstate__(self, state): method step (line 912) | def step(self, closure=None): function _test_scaled_adam (line 988) | def _test_scaled_adam(hidden_dim: int): FILE: modules/scaling.py class ActivationBalancerFunction (line 35) | class ActivationBalancerFunction(torch.autograd.Function): method forward (line 37) | def forward( method backward (line 55) | def backward(ctx, x_grad: Tensor) -> Tuple[Tensor, None, None, None]: function _compute_scale_factor (line 76) | def _compute_scale_factor( function _compute_sign_factor (line 105) | def _compute_sign_factor( class ActivationScaleBalancerFunction (line 141) | class ActivationScaleBalancerFunction(torch.autograd.Function): method forward (line 149) | def forward( method backward (line 164) | def backward(ctx, x_grad: Tensor) -> Tuple[Tensor, None, None, None]: class RandomClampFunction (line 180) | class RandomClampFunction(torch.autograd.Function): method forward (line 182) | def forward( method backward (line 201) | def backward( function random_clamp (line 212) | def random_clamp( function random_cast_to_half (line 222) | def random_cast_to_half(x: Tensor, min_abs: float = 5.0e-06) -> Tensor: class RandomGradFunction (line 237) | class RandomGradFunction(torch.autograd.Function): method forward (line 244) | def forward(ctx, x: Tensor, min_abs: float) -> Tensor: method backward (line 249) | def backward(ctx, ans_grad: Tensor) -> Tuple[Tensor, None]: class RandomGrad (line 261) | class RandomGrad(torch.nn.Module): method __init__ (line 267) | def __init__(self, min_abs: float = 5.0e-06): method forward (line 271) | def forward(self, x: Tensor): class SoftmaxFunction (line 282) | class SoftmaxFunction(torch.autograd.Function): method forward (line 289) | def forward(ctx, x: Tensor, dim: int): method backward (line 302) | def backward(ctx, ans_grad: Tensor): function softmax (line 312) | def softmax(x: Tensor, dim: int): class MaxEigLimiterFunction (line 319) | class MaxEigLimiterFunction(torch.autograd.Function): method forward (line 321) | def forward( method backward (line 335) | def backward(ctx, x_grad, *args): class BasicNorm (line 360) | class BasicNorm(torch.nn.Module): method __init__ (line 390) | def __init__( method forward (line 409) | def forward(self, x: Tensor) -> Tensor: function ScaledLinear (line 427) | def ScaledLinear(*args, initial_scale: float = 1.0, **kwargs) -> nn.Linear: function ScaledConv1d (line 452) | def ScaledConv1d( function TransposeScaledConv1d (line 483) | def TransposeScaledConv1d( function ScaledConv1dTranspose (line 505) | def ScaledConv1dTranspose( function TransposeConv1d (line 527) | def TransposeConv1d( function Conv1dTranspose (line 539) | def Conv1dTranspose( class SRLinear (line 551) | class SRLinear(nn.Linear): method __init__ (line 556) | def __init__(self, in_features, out_features, bias=True, **kwargs): method get_sigma (line 566) | def get_sigma(self): method get_weight (line 576) | def get_weight(self): method forward (line 583) | def forward(self, x): class SRConv1d (line 587) | class SRConv1d(SRLinear): method __init__ (line 588) | def __init__( method forward (line 605) | def forward(self, x): function TransposeSRConv1d (line 615) | def TransposeSRConv1d( function SRConv1dTranspose (line 627) | def SRConv1dTranspose( class ActivationBalancer (line 639) | class ActivationBalancer(torch.nn.Module): method __init__ (line 679) | def __init__( method forward (line 710) | def forward(self, x: Tensor) -> Tensor: function penalize_abs_values_gt (line 764) | def penalize_abs_values_gt(x: Tensor, limit: float, penalty: float) -> T... function _diag (line 792) | def _diag(x: Tensor): # like .diag(), but works for tensors with 3 dims. function _whitening_metric (line 803) | def _whitening_metric(x: Tensor, num_groups: int): class WhiteningPenaltyFunction (line 841) | class WhiteningPenaltyFunction(torch.autograd.Function): method forward (line 843) | def forward( method backward (line 857) | def backward(ctx, x_grad: Tensor): class Whiten (line 882) | class Whiten(nn.Module): method __init__ (line 883) | def __init__( method forward (line 924) | def forward(self, x: Tensor) -> Tensor: class WithLoss (line 965) | class WithLoss(torch.autograd.Function): method forward (line 967) | def forward(ctx, x: Tensor, y: Tensor): method backward (line 972) | def backward(ctx, ans_grad: Tensor): function with_loss (line 978) | def with_loss(x, y): function _no_op (line 985) | def _no_op(x: Tensor) -> Tensor: class Identity (line 994) | class Identity(torch.nn.Module): method __init__ (line 995) | def __init__(self): method forward (line 998) | def forward(self, x): class MaxEig (line 1002) | class MaxEig(torch.nn.Module): method __init__ (line 1023) | def __init__( method forward (line 1053) | def forward(self, x: Tensor) -> Tensor: method _set_direction (line 1111) | def _set_direction(self, direction: Tensor): method _find_direction_coeffs (line 1126) | def _find_direction_coeffs( class DoubleSwishFunction (line 1156) | class DoubleSwishFunction(torch.autograd.Function): method forward (line 1173) | def forward(ctx, x: Tensor) -> Tensor: method backward (line 1206) | def backward(ctx, y_grad: Tensor) -> Tensor: class DoubleSwish (line 1215) | class DoubleSwish(torch.nn.Module): method forward (line 1216) | def forward(self, x: Tensor) -> Tensor: function BalancedDoubleSwish (line 1225) | def BalancedDoubleSwish( function _test_max_eig (line 1240) | def _test_max_eig(): function _test_whiten (line 1267) | def _test_whiten(): function _test_activation_balancer_sign (line 1294) | def _test_activation_balancer_sign(): function _test_activation_balancer_magnitude (line 1320) | def _test_activation_balancer_magnitude(): function _test_basic_norm (line 1348) | def _test_basic_norm(): function _test_double_swish_deriv (line 1365) | def _test_double_swish_deriv(): function _test_softmax (line 1379) | def _test_softmax(): FILE: modules/scheduler.py function calc_lr (line 24) | def calc_lr(step, dim_embed, warmup_steps): class NoamScheduler (line 30) | class NoamScheduler(torch.optim.lr_scheduler._LRScheduler): method __init__ (line 31) | def __init__( method get_lr (line 48) | def get_lr(self) -> float: method set_step (line 54) | def set_step(self, step: int): function get_scheduler (line 58) | def get_scheduler(params, optimizer): FILE: modules/transformer.py class LayerNorm (line 17) | class LayerNorm(nn.Module): method __init__ (line 23) | def __init__( method reset_parameters (line 52) | def reset_parameters(self) -> None: method forward (line 57) | def forward(self, input: Tensor, embedding: Any = None) -> Tensor: method extra_repr (line 76) | def extra_repr(self) -> str: class AdaptiveLayerNorm (line 83) | class AdaptiveLayerNorm(nn.Module): method __init__ (line 86) | def __init__(self, d_model, norm) -> None: method forward (line 93) | def forward(self, input: Tensor, embedding: Tensor = None) -> Tensor: class BasicNorm (line 111) | class BasicNorm(_BasicNorm): method __init__ (line 112) | def __init__( method forward (line 121) | def forward(self, input: Tensor, embedding: Any = None) -> Tensor: class BalancedBasicNorm (line 133) | class BalancedBasicNorm(nn.Module): method __init__ (line 134) | def __init__( method forward (line 151) | def forward(self, input: Tensor, embedding: Any = None) -> Tensor: class IdentityNorm (line 160) | class IdentityNorm(nn.Module): method __init__ (line 161) | def __init__( method forward (line 170) | def forward(self, input: Tensor, embedding: Any = None) -> Tensor: class TransformerEncoderLayer (line 178) | class TransformerEncoderLayer(nn.Module): method __init__ (line 181) | def __init__( method __setstate__ (line 260) | def __setstate__(self, state): method forward (line 265) | def forward( method infer (line 314) | def infer( method _sa_block (line 354) | def _sa_block( method _ff_block (line 371) | def _ff_block(self, x: Tensor) -> Tensor: class TransformerEncoder (line 376) | class TransformerEncoder(nn.Module): method __init__ (line 396) | def __init__(self, encoder_layer, num_layers, norm=None): method forward (line 402) | def forward( method infer (line 447) | def infer( class TransformerDecoderLayer (line 476) | class TransformerDecoderLayer(nn.Module): method __init__ (line 479) | def __init__( method forward (line 572) | def forward( method _sa_block (line 631) | def _sa_block( method _mha_block (line 648) | def _mha_block( method _ff_block (line 666) | def _ff_block(self, x: Tensor) -> Tensor: function _get_clones (line 671) | def _get_clones(module, N): function _get_activation_fn (line 675) | def _get_activation_fn(activation: str) -> Callable[[Tensor], Tensor]: FILE: utils/__init__.py class Transpose (line 11) | class Transpose(nn.Identity): method forward (line 14) | def forward(self, input: torch.Tensor) -> torch.Tensor: FILE: utils/download.py function download_file_from_google_drive (line 5) | def download_file_from_google_drive(id, destination): function get_confirm_token (line 20) | def get_confirm_token(response): function save_response_content (line 28) | def save_response_content(response, destination): function main (line 37) | def main(): FILE: utils/g2p/__init__.py class PhonemeBpeTokenizer (line 11) | class PhonemeBpeTokenizer: method __init__ (line 12) | def __init__(self, tokenizer_path = "./utils/g2p/bpe_1024.json"): method tokenize (line 15) | def tokenize(self, text): function text_to_sequence (line 27) | def text_to_sequence(text, cleaner_names): function cleaned_text_to_sequence (line 46) | def cleaned_text_to_sequence(cleaned_text): function sequence_to_text (line 57) | def sequence_to_text(sequence): function _clean_text (line 66) | def _clean_text(text, cleaner_names): FILE: utils/g2p/cleaners.py function japanese_cleaners (line 6) | def japanese_cleaners(text): function japanese_cleaners2 (line 11) | def japanese_cleaners2(text): function chinese_cleaners (line 14) | def chinese_cleaners(text): function cje_cleaners (line 22) | def cje_cleaners(text): function clean_one (line 49) | def clean_one(text): FILE: utils/g2p/english.py function expand_abbreviations (line 87) | def expand_abbreviations(text): function collapse_whitespace (line 93) | def collapse_whitespace(text): function _remove_commas (line 97) | def _remove_commas(m): function _expand_decimal_point (line 101) | def _expand_decimal_point(m): function _expand_dollars (line 105) | def _expand_dollars(m): function _expand_ordinal (line 126) | def _expand_ordinal(m): function _expand_number (line 130) | def _expand_number(m): function normalize_numbers (line 145) | def normalize_numbers(text): function mark_dark_l (line 155) | def mark_dark_l(text): function english_to_ipa (line 159) | def english_to_ipa(text): function english_to_lazy_ipa (line 169) | def english_to_lazy_ipa(text): function english_to_ipa2 (line 176) | def english_to_ipa2(text): function english_to_lazy_ipa2 (line 184) | def english_to_lazy_ipa2(text): FILE: utils/g2p/japanese.py function symbols_to_japanese (line 68) | def symbols_to_japanese(text): function japanese_to_romaji_with_accent (line 74) | def japanese_to_romaji_with_accent(text): function get_real_sokuon (line 116) | def get_real_sokuon(text): function get_real_hatsuon (line 122) | def get_real_hatsuon(text): function japanese_to_ipa (line 128) | def japanese_to_ipa(text): function japanese_to_ipa2 (line 139) | def japanese_to_ipa2(text): function japanese_to_ipa3 (line 148) | def japanese_to_ipa3(text): FILE: utils/g2p/mandarin.py function number_to_chinese (line 235) | def number_to_chinese(text): function chinese_to_bopomofo (line 242) | def chinese_to_bopomofo(text): function latin_to_bopomofo (line 260) | def latin_to_bopomofo(text): function bopomofo_to_romaji (line 266) | def bopomofo_to_romaji(text): function bopomofo_to_ipa (line 272) | def bopomofo_to_ipa(text): function bopomofo_to_ipa2 (line 278) | def bopomofo_to_ipa2(text): function chinese_to_romaji (line 284) | def chinese_to_romaji(text): function chinese_to_lazy_ipa (line 297) | def chinese_to_lazy_ipa(text): function chinese_to_ipa (line 304) | def chinese_to_ipa(text): function chinese_to_ipa2 (line 317) | def chinese_to_ipa2(text): FILE: utils/generation.py function preload_models (line 50) | def preload_models(): function generate_audio (line 92) | def generate_audio(text, prompt=None, language='auto', accent='no-accent'): function generate_audio_from_long_text (line 155) | def generate_audio_from_long_text(text, prompt=None, language='auto', ac... FILE: utils/prompt_making.py function transcribe_one (line 33) | def transcribe_one(model, audio_path): function make_prompt (line 57) | def make_prompt(name, audio_prompt_path, transcript=None): function make_transcript (line 87) | def make_transcript(name, wav, sr, transcript=None): FILE: utils/sentence_cutter.py function split_text_into_sentences (line 7) | def split_text_into_sentences(text): FILE: utils/symbol_table.py class SymbolTable (line 31) | class SymbolTable(Generic[Symbol]): method __post_init__ (line 57) | def __post_init__(self): method from_str (line 76) | def from_str(s: str) -> 'SymbolTable': method from_file (line 109) | def from_file(filename: str) -> 'SymbolTable': method to_str (line 133) | def to_str(self) -> str: method to_file (line 144) | def to_file(self, filename: str): method add (line 165) | def add(self, symbol: Symbol, index: Optional[int] = None) -> int: method get (line 197) | def get(self, k: Union[int, Symbol]) -> Union[Symbol, int]: method merge (line 214) | def merge(self, other: 'SymbolTable') -> 'SymbolTable': method _check_compatible (line 233) | def _check_compatible(self, other: 'SymbolTable') -> None: method __getitem__ (line 250) | def __getitem__(self, item: Union[int, Symbol]) -> Union[Symbol, int]: method __contains__ (line 253) | def __contains__(self, item: Union[int, Symbol]) -> bool: method __len__ (line 259) | def __len__(self) -> int: method __eq__ (line 262) | def __eq__(self, other: 'SymbolTable') -> bool: method ids (line 273) | def ids(self) -> List[int]: method symbols (line 281) | def symbols(self) -> List[Symbol]: