MCPcopy Create free account

hub / github.com/FunAudioLLM/FunMusic / functions

Functions702 in github.com/FunAudioLLM/FunMusic

↓ 2 callersFunctiongenerate_filename
()
app.py:48
↓ 2 callersFunctionget_args
( task, text="", audio=None, model_name="InspireMusic-Base", chorus="intro", output_sample_rate=48000, m
app.py:53
↓ 2 callersFunctionget_dummy_input
(batch_size, seq_len, out_channels, device)
inspiremusic/bin/export_onnx.py:33
↓ 2 callersFunctionget_extra_padding_for_conv1d
See `pad_for_conv1d`.
inspiremusic/wavtokenizer/encoder/modules/conv.py:54
↓ 2 callersMethodget_num_quantizers_for_bandwidth
Return n_q based on specified target bandwidth.
inspiremusic/wavtokenizer/encoder/quantization/vq.py:142
↓ 2 callersFunctionget_padding
(kernel_size, dilation=1)
inspiremusic/utils/common.py:92
↓ 2 callersFunctionget_tokenizer
(tokenizer_name, tokenizer_path)
inspiremusic/text/tokenizer.py:25
↓ 2 callersFunctionlog_per_step
(writer, info_dict)
inspiremusic/utils/train_utils.py:266
↓ 2 callersFunctionmel_spectrogram
(y, n_fft, num_mels, sampling_rate,
inspiremusic/music_tokenizer/meldataset.py:53
↓ 2 callersFunctionmusic_generation
(args)
app.py:106
↓ 2 callersFunctionnucleus_sampling
(weighted_scores, top_p=0.8, top_k=25)
inspiremusic/utils/common.py:170
↓ 2 callersFunctionpad1d
Tiny wrapper around F.pad, just to allow for reflect padding on small input. If this is the case, we insert extra 0 padding to the right before th
inspiremusic/wavtokenizer/encoder/modules/conv.py:79
↓ 2 callersMethodposition_encoding
For getting encoding in a streaming fashion Attention!!!!! we apply dropout only once at the whole utterance level in a none
inspiremusic/transformer/embedding.py:79
↓ 2 callersMethodpostprocess_emb
(self, embed_ind, shape)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:185
↓ 2 callersMethodpreprocess
(self, x)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:171
↓ 2 callersMethodpull
Pull a symbol, reading as many bits from the stream as required. This returns `None` when the stream has been exhausted. Args:
inspiremusic/wavtokenizer/encoder/quantization/ac.py:217
↓ 2 callersMethodquantize
(self, x)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:175
↓ 2 callersFunctionread_lists
(list_file)
inspiremusic/utils/file_utils.py:43
↓ 2 callersFunctionreturn_probabilities
Given an audio and the PaSST model, return the probabilities of each AudioSet class. Audio is converted to mono at 32kHz. PaSST model i
inspiremusic/metrics/passt_kld.py:58
↓ 2 callersMethodsample
Sample data according to rank/world_size/num_workers Args: data(List): input data list Returns:
inspiremusic/dataset/dataset.py:82
↓ 2 callersFunctionsample_vectors
(samples, num: int)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:63
↓ 2 callersMethodset_epoch
(self, epoch)
inspiremusic/dataset/dataset.py:115
↓ 2 callersMethodset_target_bandwidth
(self, bandwidth: float)
inspiremusic/wavtokenizer/encoder/model.py:193
↓ 2 callersFunctionsplit_paragraph
(text: str, tokenize, lang="zh", token_max_n=80, token_min_n=60, merge_len=20, comma_split=False)
inspiremusic/utils/frontend_utils.py:64
↓ 2 callersFunctionsplit_wav_into_chunks
(num_samples, wav, max_chunk_size, minimum_chunk_size=720)
inspiremusic/utils/audio_utils.py:161
↓ 2 callersFunctionsubsequent_chunk_mask
Create mask for subsequent steps (size, size) with chunk size, this is for streaming encoder Args: size (int): size of mask
inspiremusic/utils/mask.py:89
↓ 2 callersMethodtie_or_clone_weights
Tie or clone module weights (between word_emb and output_layer) depending of whether we are using TorchScript or not
inspiremusic/transformer/decoder.py:230
↓ 2 callersFunctiontokenize
Decode text to chars or BPE Inplace operation Args: data: Iterable[{key, wav, txt, sample_rate}] Returns:
inspiremusic/dataset/processor.py:294
↓ 2 callersFunctiontpr_loss
(disc_real_outputs, disc_generated_outputs, tau)
inspiremusic/utils/losses.py:5
↓ 2 callersFunctiontrim_audio
Trims the audio from the beginning to the first occurrence of silence. Parameters: waveform (Tensor): The waveform data to the input
inspiremusic/utils/audio_utils.py:223
↓ 2 callersFunctionunpad1d
Remove padding from x, handling properly zero padding. Only for 1d!
inspiremusic/wavtokenizer/encoder/modules/conv.py:99
↓ 1 callersMethod__init__
( self, text_encoder_input_size: int, llm_input_size: int, llm
inspiremusic/llm/llm.py:41
↓ 1 callersMethod__init__
(self, filters: int, in_channels: int = 1, out_channels: int = 1, n_fft: int = 1024, hop_leng
inspiremusic/wavtokenizer/encoder/msstftd.py:46
↓ 1 callersMethod__init__
(self, n_q: int = 32, card: int = 1024, dim: int = 200, **kwargs)
inspiremusic/wavtokenizer/encoder/model.py:37
↓ 1 callersMethod__init__
(self, discriminator)
inspiremusic/wavtokenizer/decoder/loss.py:126
↓ 1 callersMethod__init__
(self, cfg: DataConfig, train: bool)
inspiremusic/wavtokenizer/decoder/dataset.py:49
↓ 1 callersMethod__init__
Args: feature_extractor (FeatureExtractor): An instance of FeatureExtractor to extract features from audio signals. b
inspiremusic/wavtokenizer/decoder/experiment.py:24
↓ 1 callersMethod__init__
( self, encodec_model: str = "encodec_24khz", bandwidths: List[float] = [1.5, 3.0, 6.0
inspiremusic/wavtokenizer/decoder/feature_extractors.py:77
↓ 1 callersMethod__init__
( self, n_expert: int, n_expert_per_token: int, idim: int,
inspiremusic/transformer/positionwise_feed_forward.py:75
↓ 1 callersMethod__init__
( self, vocab_size: int, encoder_output_size: int, attention_heads: int = 4,
inspiremusic/transformer/decoder.py:58
↓ 1 callersMethod__init__
Construct an MultiHeadedAttention object.
inspiremusic/transformer/attention.py:35
↓ 1 callersMethod__init__
Construct an EncoderLayer object.
inspiremusic/transformer/encoder_layer.py:129
↓ 1 callersFunction_check_checksum
(path: Path, checksum: str)
inspiremusic/wavtokenizer/encoder/utils.py:65
↓ 1 callersFunction_check_number_of_params
(params: tp.List[torch.Tensor])
inspiremusic/wavtokenizer/encoder/distrib.py:41
↓ 1 callersFunction_cosine_annealing
(initial_lr, step, max_steps, min_lr)
inspiremusic/utils/scheduler.py:391
↓ 1 callersMethod_encode_frame
(self, x: torch.Tensor)
inspiremusic/wavtokenizer/encoder/model.py:147
↓ 1 callersMethod_extract_audio_token
(self, audio, sample_rate=24000)
inspiremusic/cli/frontend.py:56
↓ 1 callersMethod_f02uv
(self, f0)
inspiremusic/hifigan/generator.py:132
↓ 1 callersMethod_flush_common_prefix
(self)
inspiremusic/wavtokenizer/encoder/quantization/ac.py:111
↓ 1 callersMethod_flush_common_prefix
(self)
inspiremusic/wavtokenizer/encoder/quantization/ac.py:201
↓ 1 callersMethod_get_constant_lr
(self, step)
inspiremusic/utils/scheduler.py:369
↓ 1 callersMethod_get_lr
Simple const lr policy
inspiremusic/utils/scheduler.py:193
↓ 1 callersMethod_get_lr
Simple const lr policy
inspiremusic/utils/scheduler.py:372
↓ 1 callersMethod_get_warmup_lr
(self, step)
inspiremusic/utils/scheduler.py:365
↓ 1 callersMethod_infer
(self, audio: torch.Tensor, bandwidth_id: torch.Tensor = torch.tensor(0))
inspiremusic/wavtokenizer/decoder/feature_extractors.py:165
↓ 1 callersFunction_is_complex_or_float
(tensor)
inspiremusic/wavtokenizer/encoder/distrib.py:37
↓ 1 callersMethod_istft
(self, magnitude, phase)
inspiremusic/hifigan/generator.py:341
↓ 1 callersFunction_linear_overlap_add
(frames: tp.List[torch.Tensor], stride: int)
inspiremusic/wavtokenizer/encoder/utils.py:17
↓ 1 callersFunction_linear_warmup_with_cosine_annealing
(max_lr, warmup_steps, step, decay_steps, min_lr)
inspiremusic/utils/scheduler.py:397
↓ 1 callersMethod_noam_annealing
(self, initial_lr, step)
inspiremusic/utils/scheduler.py:610
↓ 1 callersFunction_noam_hold_annealing
(initial_lr, step, warmup_steps, hold_steps, decay_rate, min_lr)
inspiremusic/utils/scheduler.py:433
↓ 1 callersFunction_square_annealing
(initial_lr, step, max_steps, min_lr)
inspiremusic/utils/scheduler.py:384
↓ 1 callersFunction_squareroot_annealing
(initial_lr, step, max_steps, min_lr)
inspiremusic/utils/scheduler.py:377
↓ 1 callersMethod_stft
(self, x)
inspiremusic/hifigan/generator.py:333
↓ 1 callersMethodacoustictoken2wav
(self, token)
inspiremusic/cli/model.py:179
↓ 1 callersFunctionadd_optional_chunk_mask
Apply optional mask for encoder. Args: xs (torch.Tensor): padded input, (B, L, D), L for max length mask (torch.Tensor): mask fo
inspiremusic/utils/mask.py:127
↓ 1 callersFunctionbatch_backward
(model, info_dict, scaler)
inspiremusic/utils/train_utils.py:230
↓ 1 callersMethodbatch_inference
(self, text, audio_token, audio_token_len, text_token, text_token_len, embeddings=None, prom
inspiremusic/cli/model.py:308
↓ 1 callersMethodbuild_encoder
(self, encoder_conf=None)
inspiremusic/llm/llm.py:120
↓ 1 callersFunctioncalculate_frechet_distance
Adapted from: https://github.com/mseitzer/pytorch-fid/blob/master/src/pytorch_fid/fid_score.py Adapted from: https://github.com/gudgud96/frec
inspiremusic/metrics/openl3_fd.py:33
↓ 1 callersMethodcfg_dropout
(self, text_token, text_token_len, p)
inspiremusic/llm/llm.py:108
↓ 1 callersFunctioncheck_modify_and_save_config
(args, configs)
inspiremusic/utils/train_utils.py:83
↓ 1 callersMethodcli_inference
(self, text, audio_prompt, time_start, time_end, chorus, task, stream=False, duration_to_gen=30, sr=24000)
inspiremusic/cli/inspiremusic.py:114
↓ 1 callersFunctioncompress
Convert audio wave form to a specified lossy format: mp3, ogg, flac Args: wav (torch.Tensor): Input wav tensor. sr (int): Samplin
inspiremusic/utils/audio_utils.py:444
↓ 1 callersMethodcompute_loss
Computes diffusion loss Args: x1 (torch.Tensor): Target shape: (batch_size, n_feats, mo) mask (torch.
inspiremusic/flow/flow_matching.py:129
↓ 1 callersFunctioncontains_chinese
(text)
inspiremusic/utils/frontend_utils.py:20
↓ 1 callersFunctioncreate_sin_embedding
Create time embedding for the given positions, target dimension `dim`.
inspiremusic/wavtokenizer/encoder/modules/transformer.py:16
↓ 1 callersMethoddecode
Method to decode audio waveform from already calculated features. The features input is passed through the backbone and the head to r
inspiremusic/wavtokenizer/decoder/pretrained_model.py:149
↓ 1 callersMethoddecode
Method to decode audio waveform from already calculated features. The features input is passed through the backbone and the head to r
inspiremusic/wavtokenizer/decoder/pretrained.py:207
↓ 1 callersFunctiondefault
(val: tp.Any, d: tp.Any)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:45
↓ 1 callersFunctiondetect_silence
Detects the first occurrence of silence in the audio. Parameters: audio (Tensor): The audio waveform. sample_rate (int): The
inspiremusic/utils/audio_utils.py:193
↓ 1 callersFunctiondiscriminator_loss
(disc_real_outputs, disc_generated_outputs)
inspiremusic/music_tokenizer/models.py:352
↓ 1 callersMethoddiscriminator_loss
(self, fake, real)
inspiremusic/wavtokenizer/decoder/loss.py:137
↓ 1 callersFunctiondownload_model
(repo_url: str, output_dir: str = None, token: str = None)
inspiremusic/utils/utils.py:5
↓ 1 callersFunctiondynamic_batch
Dynamic batch the data until the total frames in batch reach `max_frames_in_batch` Args: data: Iterable[{key, feat, labe
inspiremusic/dataset/processor.py:399
↓ 1 callersFunctiondynamic_range_compression_torch
(x, C=1, clip_val=1e-5)
inspiremusic/utils/audio_utils.py:71
↓ 1 callersFunctiondynamic_range_compression_torch
(x, C=1, clip_val=1e-5)
inspiremusic/music_tokenizer/meldataset.py:35
↓ 1 callersFunctiondynamic_range_decompression_torch
(x, C=1)
inspiremusic/utils/audio_utils.py:75
↓ 1 callersFunctiondynamic_range_decompression_torch
(x, C=1)
inspiremusic/music_tokenizer/meldataset.py:38
↓ 1 callersMethodestimator
Class method to create a new Vocos model instance from a pre-trained model stored in the Hugging Face model hub.
inspiremusic/wavtokenizer/decoder/pretrained.py:112
↓ 1 callersMethodexpire_codes_
(self, batch_samples)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:159
↓ 1 callersFunctionfeature_loss
(fmap_r, fmap_g)
inspiremusic/music_tokenizer/models.py:343
↓ 1 callersFunctionfloat32_to_int16
(x)
inspiremusic/metrics/clap_score.py:28
↓ 1 callersMethodflush
Flush the remaining information to the stream.
inspiremusic/wavtokenizer/encoder/quantization/ac.py:160
↓ 1 callersMethodfor_one_step
(self, xin, idx)
inspiremusic/music_tokenizer/models.py:476
↓ 1 callersMethodforward
(self, x: torch.Tensor)
inspiremusic/flow/decoder.py:26
↓ 1 callersMethodforward
Forward diffusion Args: mu (torch.Tensor): output of encoder shape: (batch_size, n_feats, mel_timesteps)
inspiremusic/flow/flow_matching.py:32
↓ 1 callersMethodforward_chunk
Forward just one chunk Args: xs (torch.Tensor): chunk input, with shape (b=1, time, mel-dim), where `time == (ch
inspiremusic/transformer/encoder.py:185
↓ 1 callersMethodforward_discriminator
(self, batch, device)
inspiremusic/hifigan/hifigan.py:52
↓ 1 callersMethodforward_generator
(self, batch, device)
inspiremusic/hifigan/hifigan.py:31
← previousnext →101–200 of 702, ranked by callers