Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ASLP-lab/OSUM-Pangu
/ functions
Functions
1,198 in github.com/ASLP-lab/OSUM-Pangu
⨍
Functions
1,198
◇
Types & classes
199
↓ 3 callers
Function
do_embedding_for_two_embeds
Args: input_token_ids: (B, Lmax) ,其词表范围是[0, vocab_size1+vocab_size2) dividing_id: int, 第一个词表的个数 embedding1: nn.Embedding
wenet/llm_asr/utils4llmasr.py:376
↓ 3 callers
Method
eos_symbol
Export interface for c++ call, return eos symbol id of the model
wenet/transformer/asr_model.py:408
↓ 3 callers
Function
f
(name_idx=name_idx)
tools/latency_metrics.py:264
↓ 3 callers
Method
forward
( self, hidden, target_label: Optional[torch.Tensor] = None, mask: torch.Tenso
wenet/paraformer/cif.py:55
↓ 3 callers
Method
forward_one_step
Forward one step. This is only used for decoding. Args: memory: encoded memory, float32 (batch, maxlen_in, feat)
wenet/transformer/decoder.py:226
↓ 3 callers
Method
get_label_embedding
(self, labels, labels_lengths, unk_id=7672)
wenet/llm_asr/llmasr_model_instruct_version.py:181
↓ 3 callers
Function
log_per_step
(writer, info_dict, timer: Optional[StepTimer] = None)
wenet/utils/train_utils.py:819
↓ 3 callers
Function
make_streaming_mode_from_s2s
Args: text_tokens_padded: (B, Lmax) text_tokens_lens: (B,) speech_tokens_padded: (B, Lmax2) speech_tokens_lens:
wenet/llm_asr/utils4llmasr.py:227
↓ 3 callers
Function
mask_finished_preds
If a sequence is finished, all of its branch should be <eos> Args: pred (torch.Tensor): A int array with shape (batch_si
wenet/utils/mask.py:288
↓ 3 callers
Function
mask_finished_scores
If a sequence is finished, we only allow one alive branch. This function aims to give one branch a zero score and the rest -inf score. A
wenet/utils/mask.py:258
↓ 3 callers
Method
merge_AB
(self)
wenet/finetune/lora/layers.py:233
↓ 3 callers
Function
read_symbol_table
(symbol_table_file)
wenet/utils/file_utils.py:61
↓ 3 callers
Function
reverse_pad_list
Reverse padding for the list of tensors. Args: ys_pad (tensor): The padded tensor (B, Tokenmax). ys_lens (tensor): The lens of to
wenet/utils/common.py:244
↓ 3 callers
Method
score
(self)
wenet/transformer/search.py:83
↓ 3 callers
Function
scripting
(model)
wenet/bin/export_ipex.py:33
↓ 3 callers
Function
subsequent_mask
Create mask for subsequent steps (size, size). This mask is used only in decoder which works in an auto-regressive mode. This means the curre
wenet/utils/mask.py:52
↓ 3 callers
Method
times
(self)
wenet/transformer/search.py:89
↓ 3 callers
Method
viterbi_score
(self)
wenet/transformer/search.py:86
↓ 2 callers
Function
ApplyPadding
Args: input: [bs, max_time_step, dim] padding: [bs, max_time_step]
wenet/transducer/predictor.py:8
↓ 2 callers
Method
__init__
(self, config: Qwen2Config, layer_idx: Optional[int] = None)
patches/modelling_qwen2_infer_gpu.py:33
↓ 2 callers
Method
__init__
(self, n_head, in_feat, n_feat, dropout_ra
wenet/paraformer/attention.py:121
↓ 2 callers
Method
__init__
( self, idim: int, hidden_units: int, dropout_rate: float, activation:
wenet/transformer/positionwise_feed_forward.py:78
↓ 2 callers
Method
_build_sp
(self)
wenet/text/bpe_tokenizer.py:25
↓ 2 callers
Method
_calc_att_loss
( self, encoder_out: torch.Tensor, encoder_mask: torch.Tensor, ys_pad: torch.T
wenet/whisper/whisper.py:63
↓ 2 callers
Method
_calc_att_loss
( self, encoder_out: torch.Tensor, encoder_mask: torch.Tensor, ys_pad: torch.T
wenet/transformer/asr_model.py:236
↓ 2 callers
Function
_compute_contrastive_loss
(quantized_features: torch.Tensor, features: torch.Tensor,
wenet/ssl/wav2vec2/wav2vec2_model.py:58
↓ 2 callers
Method
_compute_perplexity
(probs, mask=None)
wenet/ssl/wav2vec2/quantizer.py:55
↓ 2 callers
Method
_conv_forward
(self, input: Tensor, weight: Tensor, bias: Optional[Tensor])
wenet/squeezeformer/conv2d.py:53
↓ 2 callers
Method
_decode
(self, audio_file: str, tokens_info: bool = False, label: str
wenet/cli/model.py:84
↓ 2 callers
Method
_forward_paraformer
( self, speech: torch.Tensor, speech_lengths: torch.Tensor, decoding_chunk_siz
wenet/paraformer/paraformer.py:326
↓ 2 callers
Method
_get_embedding_for_history
prompt_patern1,prompt,history, wav, prompt_patern2,txt,answer_wav, historcy_batch的内容是: [ big_embed, [
wenet/llm_asr/llmasr_model_instruct_version.py:206
↓ 2 callers
Method
_get_lr
Simple const lr policy
wenet/utils/scheduler.py:137
↓ 2 callers
Function
_isAllAlpha
(word: Union[List[Any], str])
wenet/paraformer/search.py:35
↓ 2 callers
Function
_isAllChinese
(word: Union[List[Any], str])
wenet/paraformer/search.py:16
↓ 2 callers
Function
_isChinese
(ch: str)
wenet/paraformer/search.py:10
↓ 2 callers
Function
_sample_negative_indices
Sample `num_negatives` vectors from feature vectors.
wenet/ssl/wav2vec2/wav2vec2_model.py:15
↓ 2 callers
Function
_tokenize_by_seg_dic_or_bpe_model
( txt, sp=None, seg_dict=None, upper=True, )
wenet/text/tokenize_utils.py:28
↓ 2 callers
Function
add_blank
Prepad blank for transducer predictor Args: ys_pad (torch.Tensor): batch of padded target sequences (B, Lmax) blank (int): index
wenet/utils/common.py:79
↓ 2 callers
Function
attention_rescoring
Args: ctc_prefix_results(List[DecodeResult]): ctc prefix beam search results
wenet/transformer/search.py:369
↓ 2 callers
Function
batch_forward
(model, batch, scaler, info_dict, device)
wenet/utils/train_utils.py:689
↓ 2 callers
Function
batch_inference_s2t
批量进行S2T推理(支持wav.scp格式:key wav_path) Args: wav_scp_path: wav.scp文件路径 output_txt_path: 输出结果文件路径 prompt: 推理使用的提示词
infer_code/infer_ASR.py:122
↓ 2 callers
Function
batch_inference_s2t
批量进行S2T推理(支持wav.scp格式:key wav_path) Args: wav_scp_path: wav.scp文件路径 output_txt_path: 输出结果文件路径 prompt: 推理使用的提示词
infer_code/infer_VED.py:122
↓ 2 callers
Function
batch_inference_s2t
批量进行S2T推理(支持wav.scp格式:key wav_path) Args: wav_scp_path: wav.scp文件路径 output_txt_path: 输出结果文件路径 prompt: 推理使用的提示词
infer_code/infer_SRWT.py:122
↓ 2 callers
Function
batch_inference_s2t
批量进行S2T推理(支持wav.scp格式:key wav_path) Args: wav_scp_path: wav.scp文件路径 output_txt_path: 输出结果文件路径 prompt: 推理使用的提示词
infer_code/infer_STTC.py:130
↓ 2 callers
Function
batch_inference_s2t
批量进行S2T推理(支持wav.scp格式:key wav_path) Args: wav_scp_path: wav.scp文件路径 output_txt_path: 输出结果文件路径 prompt: 推理使用的提示词
infer_code/infer_SAP.py:122
↓ 2 callers
Function
batch_inference_s2t
批量进行S2T推理(支持wav.scp格式:key wav_path) Args: wav_scp_path: wav.scp文件路径 output_txt_path: 输出结果文件路径 prompt: 推理使用的提示词
infer_code/infer_SSR.py:122
↓ 2 callers
Function
batch_inference_s2t
批量进行S2T推理(支持wav.scp格式:key wav_path) Args: wav_scp_path: wav.scp文件路径 output_txt_path: 输出结果文件路径 prompt: 推理使用的提示词
infer_code/infer_SGC.py:122
↓ 2 callers
Function
batch_inference_s2t
批量进行S2T推理(支持wav.scp格式:key wav_path) Args: wav_scp_path: wav.scp文件路径 output_txt_path: 输出结果文件路径 prompt: 推理使用的提示词
infer_code/infer_SER.py:122
↓ 2 callers
Function
characterize
(string)
tools/compute-cer.py:16
↓ 2 callers
Function
characterize
(string)
tools/compute-wer.py:15
↓ 2 callers
Method
cluster
(self, data)
tools/compute-cer.py:235
↓ 2 callers
Method
cluster
(self, data)
tools/compute-wer.py:228
↓ 2 callers
Function
contain_oov
(units)
tools/fst/prepare_dict.py:18
↓ 2 callers
Function
ctc_greedy_search
(ctc_probs: torch.Tensor, ctc_lens: torch.Tensor, blank_id: int =
wenet/transformer/search.py:107
↓ 2 callers
Method
ctc_logprobs
(self, encoder_out: torch.Tensor, blank_penalty: float = 0.0,
wenet/transformer/asr_model.py:297
↓ 2 callers
Method
detokenize
(self, ids: List[int])
wenet/text/base_tokenizer.py:14
↓ 2 callers
Function
do_s2t_chat_no_think
S2T对话(无思考)
infer_code/infer_STTC.py:50
↓ 2 callers
Function
export_ctc
(asr_model, args)
wenet/bin/export_onnx_bpu.py:976
↓ 2 callers
Function
export_encoder
(asr_model, args)
wenet/bin/export_onnx_bpu.py:855
↓ 2 callers
Method
filter_blank_embedding
( self, ctc_probs: torch.Tensor, encoder_out: torch.Tensor)
wenet/transformer/asr_model.py:208
↓ 2 callers
Function
force_align
ctc forced alignment. Args: torch.Tensor ctc_probs: hidden state sequence, 2d tensor (T, D) torch.Tensor y: id sequence tensor 1d
wenet/utils/ctc_utils.py:106
↓ 2 callers
Method
forward
(self, x: torch.Tensor)
wenet/finetune/lora/layers.py:164
↓ 2 callers
Method
forward_attention
Compute attention context vector. Args: value (torch.Tensor): Transformed value, size (#batch, n_head, time2, d_k
wenet/squeezeformer/attention.py:99
↓ 2 callers
Method
forward_cif_peaks
(self, alphas: torch.Tensor, token_nums: torch.Tensor)
wenet/paraformer/paraformer.py:317
↓ 2 callers
Method
forward_layers
(self, xs: torch.Tensor, chunk_masks: torch.Tensor, pos_emb: torch.Tensor,
wenet/transformer/encoder.py:187
↓ 2 callers
Method
forward_layers_checkpointed
(self, xs: torch.Tensor, chunk_masks: torch.Tensor,
wenet/transformer/encoder.py:195
↓ 2 callers
Function
get_args
()
wenet/bin/export_onnx_cpu.py:38
↓ 2 callers
Function
get_blank_id
(configs, symbol_table)
wenet/utils/ctc_utils.py:122
↓ 2 callers
Method
get_model_by_lang
(lang: str)
wenet/cli/hub.py:87
↓ 2 callers
Function
get_record_gradient_hook
(model, record_dict)
wenet/finetune/lora/utils.py:102
↓ 2 callers
Method
get_speech_token_label_embedding
(self, speech_token_labels, speech_tokens_length)
wenet/llm_asr/llmasr_model_instruct_version.py:192
↓ 2 callers
Function
get_subsample
(config)
wenet/utils/common.py:294
↓ 2 callers
Method
identity
(self, x)
wenet/finetune/lora/layers.py:36
↓ 2 callers
Method
init_bs
(self)
wenet/transducer/transducer.py:155
↓ 2 callers
Function
init_dataset
(dataset_type, data_type, data_list_file, tokenizer: Option
wenet/utils/init_dataset.py:25
↓ 2 callers
Function
lexicon_to_fst_no_sil
Convert a lexicon to an FST (in k2 format). Args: lexicon: The input lexicon. See also :func:`read_lexicon` token2id:
tools/k2/prepare_char.py:46
↓ 2 callers
Method
load_hlg_resource_if_necessary
(self, hlg, word)
wenet/k2/model.py:123
↓ 2 callers
Function
load_trained_modules
(model: torch.nn.Module, args: None)
wenet/utils/checkpoint.py:109
↓ 2 callers
Function
make_poly_distortion
Generate a db-domain ploynomial distortion function f(x) = a * x^m * (1-x)^n + x Args: conf: a dict {'a': #int, 'm': #int, 'n':
wenet/dataset/wav_distortion.py:31
↓ 2 callers
Function
normalize
sentence, ignore_words are both in unicode
tools/compute-cer.py:67
↓ 2 callers
Function
normalize
sentence, ignore_words are both in unicode
tools/compute-wer.py:64
↓ 2 callers
Function
ol
(n)
tools/fst/ctc_token_fst_corrected.py:10
↓ 2 callers
Method
output_size
(self)
wenet/transducer/predictor.py:90
↓ 2 callers
Method
output_size
(self)
wenet/efficient_conformer/encoder.py:234
↓ 2 callers
Function
paraformer_greedy_search
( decoder_out: torch.Tensor, decoder_out_lens: torch.Tensor, cif_peaks: Optional[torch
wenet/paraformer/search.py:139
↓ 2 callers
Function
popen
(cmd, mode="rb")
wenet/dataset/kaldi_io.py:89
↓ 2 callers
Method
position_encoding
For getting encoding in a streaming fashion Attention!!!!! we apply dropout only once at the whole utterance level in a none
wenet/transformer/embedding.py:80
↓ 2 callers
Function
post_process
(list_out, file_obj, keys)
tools/onnx2horizonbin.py:236
↓ 2 callers
Method
prefix_beam_search
prefix beam search also see wenet.transducer.transducer.beam_search
wenet/transducer/search/prefix_beam_search.py:42
↓ 2 callers
Function
print_result
(info)
tools/websocket/performance-ws.py:98
↓ 2 callers
Function
read_mat
[mat] = read_mat(file_or_fd) Reads single kaldi matrix, supports ascii and binary. file_or_fd : file, gzipped file, pipe or opened file descrip
wenet/dataset/kaldi_io.py:432
↓ 2 callers
Function
read_non_lang_symbols
read non-linguistic symbol from file. The file format is like below: {NOISE}\n {BRK}\n ... Args: non_lang_sym_path: no
wenet/utils/file_utils.py:26
↓ 2 callers
Function
read_vec_flt
[flt-vec] = read_vec_flt(file_or_fd) Read kaldi float vector, ascii or binary input,
wenet/dataset/kaldi_io.py:306
↓ 2 callers
Function
read_vec_int
[int-vec] = read_vec_int(file_or_fd) Read kaldi integer vector, ascii or binary input,
wenet/dataset/kaldi_io.py:195
↓ 2 callers
Function
remove_duplicates_and_blank
(hyp: List[int], blank_id: int = 0)
wenet/utils/ctc_utils.py:23
↓ 2 callers
Function
save_checkpoint
Args: infos (dict or None): any info you want to save.
wenet/utils/checkpoint.py:73
↓ 2 callers
Function
save_model
(model, info_dict)
wenet/utils/train_utils.py:627
↓ 2 callers
Function
save_state_dict_and_infos
(state_dict, path: str, infos=None)
wenet/utils/checkpoint.py:59
↓ 2 callers
Method
sos_symbol
Export interface for c++ call, return sos symbol id of the model
wenet/transformer/asr_model.py:402
↓ 2 callers
Method
split_data
(self, total_num)
wenet/dataset/dataset.py:85
← previous
next →
101–200 of 1,198, ranked by callers