MCPcopy Create free account

hub / github.com/ASLP-lab/OSUM / functions

Functions1,852 in github.com/ASLP-lab/OSUM

↓ 116 callersMethodload
(self, llm_model, flow_model, hift_model)
OSUM-EChat/tts/cosyvoice/cli/model.py:78
↓ 55 callersFunctionto_numpy
(tensor)
OSUM/wenet/bin/export_onnx_cpu.py:59
↓ 39 callersMethodencode
( self, text: torch.Tensor, text_lengths: torch.Tensor, )
OSUM-EChat/tts/cosyvoice/llm/llm.py:72
↓ 37 callersMethoddecode
Decode input speech Args: methods:(List[str]): list of decoding methods to use, which could could contain the fo
OSUM/wenet/transformer/asr_model.py:310
↓ 37 callersMethodkeys
(self)
OSUM/tools/compute-cer.py:246
↓ 31 callersMethodlog_softmax
log_softmax of frame activations Args: Tensor hs_pad: 3d tensor (B, Tmax, eprojs) Returns: torch.Tensor: log
OSUM/wenet/transformer/ctc.py:73
↓ 25 callersMethodupdate
(self)
OSUM-EChat/wenet/dataset/dataset.py:62
↓ 24 callersMethodupdate
(self)
OSUM/wenet/dataset/dataset.py:61
↓ 22 callersFunctionmake_pad_mask
Make mask tensor containing indices of padded part. See description of make_non_pad_mask. Args: lengths (torch.Tensor): Batch of len
OSUM-EChat/wenet/utils/mask.py:201
↓ 22 callersFunctionmake_pad_mask
Make mask tensor containing indices of padded part. See description of make_non_pad_mask. Args: lengths (torch.Tensor): Batch of len
OSUM/wenet/utils/mask.py:201
↓ 17 callersMethoddecode
Decode input speech Args: methods:(List[str]): list of decoding methods to use, which could could contain the fo
OSUM-EChat/wenet/transformer/asr_model.py:310
↓ 16 callersFunctionopen_or_fd
fd = open_or_fd(file) Open file, gzipped file, pipe, or forward the file-descriptor. Eventually seeks in the 'file' argument contains ':offset'
OSUM/wenet/dataset/kaldi_io.py:54
↓ 15 callersMethodlog_softmax
log_softmax of frame activations Args: Tensor hs_pad: 3d tensor (B, Tmax, eprojs) Returns: torch.Tensor: log
OSUM-EChat/wenet/transformer/ctc.py:121
↓ 13 callersFunctioninit_model
(configs, encoder)
OSUM/wenet/ssl/init_model.py:12
↓ 12 callersMethod__init__
(self, dataset: IterDataPipe, buffer_size: int = 500, key_f
OSUM/wenet/dataset/datapipes.py:154
↓ 12 callersMethodargmax
argmax of frame activations Args: torch.Tensor hs_pad: 3d tensor (B, Tmax, eprojs) Returns: torch.Tensor: arg
OSUM/wenet/transformer/ctc.py:83
↓ 12 callersFunctiontensor_to_scalar
(x)
OSUM-EChat/wenet/utils/common.py:359
↓ 12 callersFunctiontensor_to_scalar
(x)
OSUM/wenet/utils/common.py:359
↓ 11 callersFunctionget_feat_from_wav_path
...
OSUM-EChat/common_utils/utils4infer.py:60
↓ 11 callersFunctionmake_pad_mask
Make mask tensor containing indices of padded part. See description of make_non_pad_mask. Args: lengths (torch.Tensor): Batch o
OSUM-EChat/tts/cosyvoice/utils/mask.py:242
↓ 11 callersMethodtext_normalize
(self, text, split=True, text_frontend=True)
OSUM-EChat/tts/cosyvoice/cli/frontend.py:130
↓ 10 callersMethod__init__
( self, optimizer: torch.optim.Optimizer, warmup_steps: Union[int, float] = 25000,
OSUM-EChat/tts/cosyvoice/utils/scheduler.py:44
↓ 10 callersMethod__init__
(self, module)
OSUM/wenet/bin/export_onnx_bpu.py:520
↓ 10 callersMethodgenerate
( self, wavs, wavs_len, prompt, **kwargs )
OSUM-EChat/wenet/osum_echat/llmasr_model_instruct_version.py:706
↓ 10 callersFunctionread_key
[key] = read_key(fd) Read the utterance-key from the opened ark/stream descriptor 'fd'.
OSUM/wenet/dataset/kaldi_io.py:129
↓ 9 callersMethod__init__
( self, optimizer: torch.optim.Optimizer, warmup_steps: Union[int, float, List[Union[i
OSUM-EChat/wenet/utils/scheduler.py:43
↓ 9 callersMethod__init__
( self, optimizer: torch.optim.Optimizer, warmup_steps: Union[int, float, List[Union[i
OSUM/wenet/utils/scheduler.py:43
↓ 9 callersMethod__init__
( self, in_features: int, out_features: int, r: int = 0,
OSUM/wenet/finetune/lora/layers.py:105
↓ 9 callersFunctions
(n)
OSUM/tools/fst/ctc_token_fst_corrected.py:14
↓ 8 callersMethod_build_tiktoken
(self)
OSUM-EChat/wenet/text/whisper_tokenizer.py:46
↓ 8 callersMethod_build_tiktoken
(self)
OSUM/wenet/text/whisper_tokenizer.py:46
↓ 8 callersMethod_get_embedding_from_wav
return: wav_embedding: (b, l, v) wav_mask: (b, l), wav为有效值的位置为true
OSUM-EChat/wenet/osum_echat/llmasr_model_instruct_version.py:1280
↓ 8 callersFunctionadd_sos_eos
Add <sos> and <eos> labels. Args: ys_pad (torch.Tensor): batch of padded target sequences (B, Lmax) sos (int): index of <sos>
OSUM/wenet/utils/common.py:113
↓ 8 callersFunctionget_answer_prompt_by_task
(task_tag, answer_tag, asr_txt=None)
OSUM-EChat/wenet/osum_echat/wav_instrcut_tools.py:108
↓ 8 callersFunctioninit_tokenizer
(configs)
OSUM/wenet/utils/init_tokenizer.py:26
↓ 8 callersMethodposition_encoding
(self, offset: Union[int, torch.Tensor], size: int)
OSUM/wenet/transformer/subsampling.py:32
↓ 8 callersMethodstart
(self)
OSUM/wenet/utils/common.py:347
↓ 8 callersFunctionto_numpy
(tensors)
OSUM/wenet/bin/export_onnx_gpu.py:722
↓ 8 callersMethodupdate
(self)
OSUM-EChat/tts/cosyvoice/dataset/dataset.py:60
↓ 7 callersFunctionDataset
Construct dataset from arguments We have two shuffle stage in the Dataset. The first is global shuffle at shards tar/raw file level.
OSUM/wenet/dataset/dataset.py:150
↓ 7 callersMethod__init__
(self)
OSUM-EChat/tts/cosyvoice/transformer/subsampling.py:25
↓ 7 callersMethod__init__
(self)
OSUM-EChat/wenet/transformer/subsampling.py:27
↓ 7 callersMethod__init__
(self)
OSUM/wenet/transformer/subsampling.py:27
↓ 7 callersMethod_add_bos_eos
(self, bos, eos, inputs_embeds, attention_mask, target=None)
OSUM-EChat/wenet/osum_echat/llmasr_model_instruct_version.py:1331
↓ 7 callersMethod_extract_text_token
(self, text)
OSUM-EChat/tts/cosyvoice/cli/frontend.py:84
↓ 7 callersMethod_forward_linearx
(self, name: str, x: torch.Tensor,
OSUM-EChat/wenet/transformer/attention.py:83
↓ 7 callersMethod_forward_linearx
(self, name: str, x: torch.Tensor,
OSUM/wenet/transformer/attention.py:83
↓ 7 callersMethoddo_add_speech_embed_head
(self)
OSUM-EChat/wenet/osum_echat/llmasr_model_instruct_version.py:161
↓ 7 callersMethodinference
( self, text: torch.Tensor, text_len: torch.Tensor, prompt_tex
OSUM-EChat/tts/cosyvoice/llm/llm.py:287
↓ 7 callersMethodoutput_size
(self)
OSUM/wenet/transformer/encoder.py:121
↓ 7 callersMethodset_task_type
设置任务类型,用于设置生成的初始类型 Args: task_type (str): 任务类型,从("ASR", "TTS", "S2S")选择
OSUM-EChat/wenet/osum_echat/llmasr_model_instruct_version.py:148
↓ 7 callersMethodtoken2wav
(self, token, prompt_token, prompt_feat, embedding, uuid, finalize=False, speed=1.0)
OSUM-EChat/tts/cosyvoice/cli/model.py:132
↓ 7 callersMethodtokenize
(self, line: str)
OSUM-EChat/wenet/text/base_tokenizer.py:9
↓ 6 callersMethod__init__
Actually, this implements stacking frames and skipping frames. if m = 1 and n = 1, just return the origin features. if m = 1
OSUM/wenet/paraformer/layers.py:25
↓ 6 callersMethod_build_hugging_face
(self)
OSUM-EChat/wenet/text/hugging_face_tokenizer.py:26
↓ 6 callersMethod_build_hugging_face
(self)
OSUM/wenet/text/hugging_face_tokenizer.py:26
↓ 6 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
OSUM-EChat/tts/cosyvoice/utils/mask.py:164
↓ 6 callersFunctiondistort
Distort a waveform in sample point level Args: x: the origin wavefrom func: the distort function rate: sample point-level
OSUM/wenet/dataset/wav_distortion.py:262
↓ 6 callersMethodforward_attention
Compute attention context vector. Args: value (torch.Tensor): Transformed value, size (#batch, ..., n_head, time2
OSUM/wenet/transformer/attention.py:133
↓ 6 callersFunctionget_optimized_script
(model, preserved_attrs=[])
OSUM-EChat/tts/cosyvoice/bin/export_jit.py:40
↓ 6 callersFunctionget_tokenizer
( multilingual: bool, *, num_languages: int = 99, language: Optional[str] = None, task: Op
OSUM-EChat/tts/cosyvoice/tokenizer/tokenizer.py:210
↓ 6 callersFunctionlog_add
Stable log add
OSUM/wenet/utils/common.py:305
↓ 6 callersFunctionmake_non_pad_mask
Make mask tensor containing indices of non-padded part. The sequences in a batch may have different lengths. To enable batch computing, paddi
OSUM/wenet/utils/mask.py:230
↓ 6 callersFunctionmask_to_bias
(mask: torch.Tensor, dtype: torch.dtype)
OSUM-EChat/wenet/utils/common.py:316
↓ 6 callersFunctionmask_to_bias
(mask: torch.Tensor, dtype: torch.dtype)
OSUM/wenet/utils/common.py:316
↓ 6 callersFunctionpad_list
Perform padding for the list of tensors. Args: xs (List): List of Tensors [(T_1, `*`), (T_2, `*`), ..., (T_B, `*`)]. pad_value (f
OSUM-EChat/wenet/utils/common.py:30
↓ 6 callersFunctionpad_list
Perform padding for the list of tensors. Args: xs (List): List of Tensors [(T_1, `*`), (T_2, `*`), ..., (T_B, `*`)]. pad_value (f
OSUM/wenet/utils/common.py:30
↓ 6 callersFunctionread_lists
(list_file)
OSUM-EChat/wenet/utils/file_utils.py:18
↓ 6 callersFunctionread_lists
(list_file)
OSUM/wenet/utils/file_utils.py:18
↓ 6 callersMethodset_epoch
(self, epoch)
OSUM-EChat/wenet/dataset/dataset.py:168
↓ 6 callersMethodtts
(self, text, flow_embedding, llm_embedding=torch.zeros(0, 192), prompt_text=torch.zeros(1, 0, dtyp
OSUM-EChat/tts/cosyvoice/cli/model.py:172
↓ 5 callersFunctionDataset
Construct dataset from arguments We have two shuffle stage in the Dataset. The first is global shuffle at shard tar/raw file level.
OSUM-EChat/wenet/dataset/dataset.py:395
↓ 5 callersMethod__init__
Construct an PositionalEncoding object.
OSUM-EChat/tts/cosyvoice/transformer/embedding.py:37
↓ 5 callersMethod__init__
Construct an PositionalEncoding object.
OSUM-EChat/wenet/transformer/embedding.py:38
↓ 5 callersMethod__init__
Construct an PositionalEncoding object.
OSUM/wenet/transformer/embedding.py:38
↓ 5 callersFunctiondb2amp
(db)
OSUM/wenet/dataset/wav_distortion.py:23
↓ 5 callersFunctionfade_in_out
(fade_in_mel, fade_out_mel, window)
OSUM-EChat/tts/cosyvoice/utils/common.py:140
↓ 5 callersMethodforward_qkv
Transform query, key and value. Args: query (torch.Tensor): Query tensor (#batch, ..., time1, size). key (torch.Tenso
OSUM/wenet/transformer/attention.py:109
↓ 5 callersFunctionget_dataset
(data_type, data_list_file, tokenizer: BaseTokenizer, conf,
OSUM-EChat/wenet/dataset/dataset.py:230
↓ 5 callersFunctionil
(n)
OSUM/tools/fst/ctc_token_fst_corrected.py:6
↓ 5 callersMethodinit_state
( self, batch_size: int, device: torch.device, method: str = "zero", )
OSUM/wenet/transducer/predictor.py:165
↓ 5 callersFunctioninit_tokenizer
(configs)
OSUM-EChat/wenet/utils/init_tokenizer.py:25
↓ 5 callersFunctionload_checkpoint
(model: torch.nn.Module, path: str)
OSUM/wenet/utils/checkpoint.py:26
↓ 5 callersFunctionload_model_and_tokenizer
封装了加载模型和分词器的逻辑 Args: checkpoint_path (str): 模型权重文件路径 config_path (str): 模型配置文件路径 device (torch.device): 加载模型的设备 R
OSUM-EChat/common_utils/utils4infer.py:19
↓ 5 callersFunctionload_wav
(wav, target_sr)
OSUM-EChat/tts/cosyvoice/utils/file_utils.py:41
↓ 5 callersFunctionlog_add
Stable log add
OSUM-EChat/wenet/utils/common.py:305
↓ 5 callersMethodoutput_size
(self)
OSUM/wenet/squeezeformer/encoder.py:184
↓ 5 callersFunctionprint_input_output_info
(onnx_model, name, prefix="\t\t")
OSUM/wenet/bin/export_onnx_cpu.py:66
↓ 5 callersFunctionsave_data
(tensor, dirs, prefix)
OSUM/tools/onnx2horizonbin.py:69
↓ 5 callersFunctionth_accuracy
Calculate accuracy. Args: pad_outputs (Tensor): Prediction tensors (B * Lmax, D). pad_targets (LongTensor): Target label tensors
OSUM/wenet/utils/common.py:272
↓ 5 callersFunctiontoken_list2wav
(token_list, prompt_speech, wav_path, cosyvoice)
OSUM-EChat/common_utils/utils4infer.py:40
↓ 5 callersMethodtokenize
(self, label: str)
OSUM/wenet/cli/model.py:141
↓ 5 callersMethodtrain
Train one epoch
OSUM-EChat/wenet/utils/executor.py:42
↓ 5 callersMethodupdate
(self)
OSUM-EChat/common_utils/fake_data/combine/dataset/dataset_no_wav.py:53
↓ 4 callersMethodT
(self, w)
OSUM/wenet/finetune/lora/layers.py:144
↓ 4 callersMethodT
(self, w)
OSUM/wenet/finetune/lora/layers.py:230
↓ 4 callersMethod__init__
(self, dim0: int, dim1: int)
OSUM-EChat/tts/cosyvoice/flow/decoder.py:25
↓ 4 callersMethod__init__
Construct an Conv1dSubsampling object.
OSUM-EChat/wenet/osum_echat/downsampler.py:15
↓ 4 callersMethod__init__
Construct an MultiHeadedAttention object.
OSUM-EChat/wenet/transformer/attention.py:47
↓ 4 callersMethod__init__
Construct an MultiHeadedAttention object.
OSUM/wenet/transformer/attention.py:47
next →1–100 of 1,852, ranked by callers