MCPcopy Create free account

hub / github.com/bytedance/MegaTTS3 / functions

Functions298 in github.com/bytedance/MegaTTS3

Functionconvert_to_wav
(wav_path)
tts/utils/audio_utils/io.py:67
Methoddecode
(self, ids, strip_eos=False, strip_padding=False)
tts/utils/text_utils/text_encoder.py:174
Functiondisable_sdpa
()
tts/modules/aligner/whisper_small.py:75
Methodencode
Converts a space-separated string of tokens to a list of ids.
tts/utils/text_utils/text_encoder.py:161
Functionexpand_by_repeat_times
source_encoding: [T, C] lengths, list of int, [T,], how many times each token should repeat return: expanded_encoding: [T_expand,
tts/modules/ar_dur/commons/seq_utils.py:321
Functionexpand_word2ph
(word_encoding, ph2word)
tts/modules/ar_dur/commons/seq_utils.py:338
Functionfill_with_neg_inf
FP16-compatible function that fills a tensor with -inf.
tts/modules/ar_dur/commons/seq_utils.py:84
Functionfill_with_neg_inf2
FP16-compatible function that fills a tensor with -inf.
tts/modules/ar_dur/commons/seq_utils.py:89
Methodforward
(self, x: Tensor)
tts/modules/aligner/whisper_small.py:43
Methodforward
( self, x: Tensor, xa: Optional[Tensor] = None, mask: Optional[Tensor] = None,
tts/modules/aligner/whisper_small.py:95
Methodforward
( self, x: Tensor, xa: Optional[Tensor] = None, mask: Optional[Tensor] = None,
tts/modules/aligner/whisper_small.py:152
Methodforward
x : torch.Tensor, shape = (batch_size, n_mels, n_ctx) the mel spectrogram of the audio
tts/modules/aligner/whisper_small.py:182
Methodforward
x : torch.LongTensor, shape = (batch_size, <= n_ctx) the text tokens xa : torch.Tensor, shape = (batch_size, n_audio_ctx,
tts/modules/aligner/whisper_small.py:220
Methodforward
( self, mel, mel_len, token, token_len )
tts/modules/aligner/whisper_small.py:267
Methodforward
(self, x, scale=1000)
tts/modules/llm_dit/time_embedding.py:25
Methodforward
(self, timestep)
tts/modules/llm_dit/time_embedding.py:40
Methodforward
(self, x, emb=None)
tts/modules/llm_dit/transformer.py:59
Methodforward
(self, x, emb)
tts/modules/llm_dit/transformer.py:73
Methodforward
( self, x: torch.Tensor, start_pos: int, freqs_cis: torch.Tens
tts/modules/llm_dit/transformer.py:107
Methodforward
(self, x)
tts/modules/llm_dit/transformer.py:150
Methodforward
Perform a forward pass through the TransformerBlock. Args: x (torch.Tensor): Input tensor. start_pos (int):
tts/modules/llm_dit/transformer.py:170
Methodforward
(self, x, t, attn_mask, start_pos=0)
tts/modules/llm_dit/transformer.py:224
Methodforward
(self, inputs, sigmas=None, x_noisy=None)
tts/modules/llm_dit/dit.py:70
Methodforward
(self, txt_tokens, ling_feas, char_tokens, ph2char, bert_embed, prev_code, spk_id=None, spk_em
tts/modules/ar_dur/ar_dur_predictor.py:190
Methodforward
Apply layer normalization. :param torch.Tensor x: input tensor :return: layer normalized tensor :rtype torch.Tensor
tts/modules/ar_dur/commons/layers.py:30
Methodforward
(self, x)
tts/modules/ar_dur/commons/layers.py:55
Methodforward
Input is expected to be of size [bsz x seqlen].
tts/modules/ar_dur/commons/rot_transformer.py:65
Methodforward
Apply rotary embeddings to an array. :param input: Array to apply the rotary embeddings to. :param positions: positions of t
tts/modules/ar_dur/commons/rot_transformer.py:164
Methodforward
Input shape: Time x Batch x Channel Args: key_padding_mask (ByteTensor, optional): mask to exclude keys that are
tts/modules/ar_dur/commons/rot_transformer.py:215
Methodforward
Input shape: Time x Batch x Channel Args: key_padding_mask (ByteTensor, optional): mask to exclude keys that are
tts/modules/ar_dur/commons/rot_transformer.py:413
Methodforward
( self, x, encoder_out=None, encoder_padding_mask=None,
tts/modules/ar_dur/commons/rot_transformer.py:559
Methodforward
(self, x, **kwargs)
tts/modules/ar_dur/commons/rot_transformer.py:642
Methodforward
(self, x, x_mask, attn_mask=1)
tts/modules/ar_dur/commons/rel_transformer.py:71
Methodforward
(self, x, c, attn_mask=None)
tts/modules/ar_dur/commons/rel_transformer.py:135
Methodforward
(self, x, x_mask)
tts/modules/ar_dur/commons/rel_transformer.py:268
Methodforward
(self, x)
tts/modules/ar_dur/commons/rel_transformer.py:288
Methodforward
(self, x, x_mask)
tts/modules/ar_dur/commons/rel_transformer.py:325
Methodforward
(self, x, x_mask=None, other_embeds=0, attn_mask=1)
tts/modules/ar_dur/commons/rel_transformer.py:387
Methodforward
Example (no batch dim version): 1. dur = [2,2,3] 2. token_idx = [[1],[2],[3]], dur_cumsum = [2,4,7], dur_cumsum_prev
tts/modules/ar_dur/commons/nar_tts_modules.py:28
Methodforward
(self, x)
tts/modules/ar_dur/commons/nar_tts_modules.py:70
Methodforward
Input is expected to be of size [bsz x seqlen].
tts/modules/ar_dur/commons/transformer.py:63
Methodforward
(self, x, incremental_state=None)
tts/modules/ar_dur/commons/transformer.py:105
Methodforward
Input shape: Time x Batch x Channel Args: key_padding_mask (ByteTensor, optional): mask to exclude keys that are
tts/modules/ar_dur/commons/transformer.py:218
Methodforward
(self, x, encoder_padding_mask=None, **kwargs)
tts/modules/ar_dur/commons/transformer.py:516
Methodforward
( self, x, encoder_out=None, encoder_padding_mask=None,
tts/modules/ar_dur/commons/transformer.py:562
Methodforward
(self, x, **kwargs)
tts/modules/ar_dur/commons/transformer.py:650
Methodforward
(self, x, **kwargs)
tts/modules/ar_dur/commons/transformer.py:666
Methodforward
:param txt_tokens: [B, T] :return: { 'encoder_out': [B x T x C] }
tts/modules/ar_dur/commons/transformer.py:746
Methodforward
(self, x)
tts/modules/wavvae/encoder/common_modules/seanet.py:68
Methodforward
(self, x)
tts/modules/wavvae/encoder/common_modules/seanet.py:125
Methodforward
(self, x)
tts/modules/wavvae/encoder/common_modules/conv.py:100
Methodforward
(self, x)
tts/modules/wavvae/encoder/common_modules/conv.py:115
Methodforward
(self, x)
tts/modules/wavvae/encoder/common_modules/lstm.py:45
Methodforward
(self, audio: torch.Tensor)
tts/modules/wavvae/decoder/seanet_encoder.py:35
Methodforward
(self, x)
tts/modules/wavvae/decoder/hifigan_modules.py:52
Methodforward
(self, x)
tts/modules/wavvae/decoder/hifigan_modules.py:70
Methodforward
(self, audio)
tts/modules/wavvae/decoder/hifigan_modules.py:129
Methodforward
(self, x)
tts/modules/wavvae/decoder/hifigan_modules.py:164
Methodforward
(self, x)
tts/modules/wavvae/decoder/hifigan_modules.py:197
Methodforward
(self, x)
tts/modules/wavvae/decoder/hifigan_modules.py:220
Methodforward
(self, mel, step=None)
tts/modules/wavvae/decoder/hifigan_modules.py:265
Methodforward
(self, audio)
tts/modules/wavvae/decoder/wavvae_v3.py:56
Functionget_mask_from_lengths
(lengths)
tts/modules/ar_dur/commons/seq_utils.py:298
Functiongroup_hidden_by_segs
:param h: [B, T, H] :param seg_ids: [B, T] :return: h_ph: [B, T_ph, H]
tts/modules/ar_dur/commons/seq_utils.py:305
Functioninit_weights
(m, mean=0.0, std=0.01)
tts/modules/wavvae/decoder/hifigan_modules.py:25
Methodinstall_hooks
(layer: nn.Module)
tts/modules/aligner/whisper_small.py:303
Methodinstall_kv_cache_hooks
The `MultiHeadAttention` module optionally accepts `kv_cache` which stores the key and value tensors calculated for the previous posi
tts/modules/aligner/whisper_small.py:278
Methodkl
(self, other: "DiagonalGaussianDistribution" = None)
tts/modules/wavvae/decoder/diag_gaussian.py:42
Functionload_with_size_mismatch
(model, state_dict, prefix="")
tts/utils/commons/ckpt_utils.py:168
Functionmain
(inp_audio, inp_npy, inp_text, infer_timestep, p_w, t_w, processes, input_queue, output_queue)
tts/gradio_api.py:51
Functionmake_non_pad_mask
Make mask tensor containing indices of non-padded part. Args: lengths (LongTensor or List): Batch of lengths (B,). xs (Tensor, opt
tts/modules/ar_dur/commons/seq_utils.py:218
Functionmap_phone_to_tokendict
(item, pad_bos_eos=True)
tts/utils/text_utils/ph_tone_convert.py:18
Methodmax_positions
Maximum number of supported positions.
tts/modules/ar_dur/commons/rot_transformer.py:86
Methodmax_positions
Maximum number of supported positions.
tts/modules/ar_dur/commons/transformer.py:84
Methodmode
(self)
tts/modules/wavvae/decoder/diag_gaussian.py:66
Functionmodel_worker
(input_queue, output_queue, device_id)
tts/gradio_api.py:27
Methodnll
(self, sample, dims)
tts/modules/wavvae/decoder/diag_gaussian.py:57
Methodnum_reserved_ids
(self)
tts/utils/text_utils/text_encoder.py:59
Functionparse_config
(v, context=None)
tts/utils/commons/hparams.py:51
Methodremove_weight_norm
(self)
tts/modules/wavvae/decoder/hifigan_modules.py:206
Methodsave_to_cache
(module, _, output)
tts/modules/aligner/whisper_small.py:295
Methodseg
(self)
tts/utils/text_utils/text_encoder.py:254
Functionselect_attn
:param attn_logits: [n_layers, B, n_head, T_sp, T_txt] :return:
tts/modules/ar_dur/commons/seq_utils.py:94
Functionsequence_mask
(lengths, maxlen=None, dtype=torch.bool)
tts/modules/ar_dur/commons/seq_utils.py:39
Methodset_buffer
(self, *args)
tts/modules/ar_dur/commons/rot_transformer.py:648
Methodset_buffer
(self, *args)
tts/modules/ar_dur/commons/transformer.py:672
Functionshift_1d
(x)
tts/modules/ar_dur/commons/rel_transformer.py:29
Methodsil_phonemes
(self)
tts/utils/text_utils/text_encoder.py:270
Functionspec_to_figure
(spec, vmin=None, vmax=None, title='', f0s=None, dur_info=None, figsize=(12, 6))
tts/utils/audio_utils/plot.py:25
Methodstore_to_file
Write vocab file to disk. Vocab files have one token per line. The file ends in a newline. Reserved tokens are written to the vocab f
tts/utils/text_utils/text_encoder.py:257
Methodstreaming_infer
(self, txt_tokens, ling_feas, char_tokens, ph2char, bert_embed, spk_id=None, spk_embed
tts/modules/ar_dur/ar_dur_predictor.py:322
Methodtoken_gen
()
tts/utils/text_utils/text_encoder.py:206
Methodunk
(self)
tts/utils/text_utils/text_encoder.py:251
Methodvocab_size
(self)
tts/utils/text_utils/text_encoder.py:117
Methodvocab_size
(self)
tts/utils/text_utils/text_encoder.py:188
Functionweights_init
(m)
tts/modules/wavvae/decoder/hifigan_modules.py:75
Functionweights_nonzero_speech
(target)
tts/modules/ar_dur/commons/seq_utils.py:47
Functionweights_zero_init
(m)
tts/modules/wavvae/decoder/hifigan_modules.py:84
← previous201–298 of 298, ranked by callers