MCPcopy Create free account

hub / github.com/darkautism/sensevoice-rs / functions

Functions46 in github.com/darkautism/sensevoice-rs

↓ 8 callersMethodforward
(&self, xs: &Tensor)
src/asr_candle_pt.rs:147
↓ 5 callersMethodforward
( &self, input: &Tensor, cache: &Tensor, )
src/silero_vad.rs:36
↓ 4 callersMethodreset
(&mut self)
src/silero_vad.rs:349
↓ 3 callersMethoddestroy
Destroys the `SenseVoiceSmall` instance, releasing associated resources. This method ensures that the RKNN model resources are properly cleaned up.
src/lib.rs:848
↓ 2 callersMethodextract_features
Extracts mel-frequency features from a waveform. Processes the input waveform to produce fbank features, applies LFR, and optionally applies CMVN. #
src/wavfrontend.rs:346
↓ 2 callersMethodfinalize_segment
(&mut self, trim_tail: bool)
src/silero_vad.rs:316
↓ 2 callersMethodfinish
(&mut self)
src/silero_vad.rs:359
↓ 2 callersMethodids_to_text
Helper to convert token IDs to text
src/lib.rs:738
↓ 2 callersMethodinfer_file
Performs speech recognition on an audio file.
src/lib.rs:674
↓ 2 callersFunctionparse_line
Parses a string line into a `VoiceText` instance based on a specific format. The expected format is: `<|language|><|emotion|><|event|><|punctuation|>
src/lib.rs:249
↓ 2 callersMethodrecognition
(&self, segment: &[i16])
src/lib.rs:584
↓ 2 callersMethodrun
( &self, audio_feats: &Array2<f32>, _speech_length: i64, language: i64,
src/asr_candle_pt.rs:267
↓ 1 callersMethodapply_cmvn
Applies cepstral mean and variance normalization (CMVN) to features. Normalizes the features using precomputed mean and variance values if available.
src/wavfrontend.rs:307
↓ 1 callersMethodapply_lfr
Applies low frame rate (LFR) processing to fbank features. Stacks and subsamples frames to reduce the frame rate, padding as necessary. # Arguments
src/wavfrontend.rs:255
↓ 1 callersMethodcompute_fbank_features
Computes mel-frequency filterbank (fbank) features from a waveform. Uses the `kaldi_fbank_rust` library to extract fbank features based on the config
src/wavfrontend.rs:194
↓ 1 callersMethoddecode_asr_output
(&self, output: &[f32])
src/lib.rs:709
↓ 1 callersMethoddecode_onnx_output
Decodes ONNX output.
src/lib.rs:757
↓ 1 callersMethodfill_buffer
(&mut self)
examples/stream.rs:36
↓ 1 callersMethodforward_simple
(&self, xs: &Tensor)
src/asr_candle_pt.rs:74
↓ 1 callersMethodinfer_stream
( &'a mut self, input_stream: S, )
src/lib.rs:620
↓ 1 callersMethodinfer_vec
Performs speech recognition on a vector of audio samples.
src/lib.rs:522
↓ 1 callersMethodpositional_encoding
( &self, seq_len: usize, dim: usize, )
src/asr_candle_pt.rs:209
↓ 1 callersMethodpredict_probability
( &mut self, chunk: &[i16; CHUNK_SIZE], )
src/silero_vad.rs:124
↓ 1 callersMethodprepare_rknn_input_advanced
( &self, feats: &Array2<f32>, language: usize, use_itn: bool, )
src/lib.rs:867
↓ 1 callersMethodprocess_chunk
(&mut self, chunk: &[i16; CHUNK_SIZE])
src/silero_vad.rs:258
↓ 1 callersMethodread
(&mut self, buf: &mut [u8])
examples/stream.rs:51
↓ 1 callersFunctionreader_to_stream
(mut reader: DelayedReader)
examples/stream.rs:71
↓ 1 callersMethodset_notify_silence_after_ms
更新通知靜音的設定
src/silero_vad.rs:251
Methoddefault
()
src/silero_vad.rs:195
Methoddefault
Creates a `WavFrontendConfig` instance with default values. # Returns A `WavFrontendConfig` instance with commonly used default settings.
src/wavfrontend.rs:58
Methodfmt
(&self, f: &mut fmt::Formatter<'_>)
src/lib.rs:286
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/silero_vad.rs:68
Methodfrom_str
Converts a string to a `SenseVoiceLanguage` variant. This method parses a string (case-insensitive) and returns the corresponding language variant.
src/lib.rs:68
Methodinit
Initializes a new `SenseVoiceSmall` instance. If the `rknpu` feature is enabled, it initializes the RKNN backend using the default RKNN model. Otherw
src/lib.rs:357
Methodinit_official_model_pt
Initializes using official `FunAudioLLM/SenseVoiceSmall` assets (`model.pt` path). This uses the native Candle PT backend.
src/lib.rs:428
Methodinit_with_config
Initializes a new `SenseVoiceSmall` instance with custom configuration. # Arguments `config` - The configuration containing file paths. `vadconfig`
src/lib.rs:453
Methodload_cmvn
Loads CMVN statistics from a file. Parses a CMVN file to extract mean and variance vectors for normalization. # Arguments `path` - Path to the CMVN
src/wavfrontend.rs:141
Functionmain
()
examples/official_model_pt.rs:4
Functionmain
()
examples/stream.rs:95
Functionmain
()
examples/basic.rs:4
Methodnew
( vb: VarBuilder, n_head: usize, in_dim: usize, hidden_dim: usize, )
src/asr_candle_pt.rs:37
Methodnew
Creates a new `SenseVoiceSmallError` instance with the given message. # Arguments `message` - The error message to encapsulate. # Returns A new `S
src/lib.rs:305
Methodnew
(vb: VarBuilder)
src/silero_vad.rs:22
Methodnew
Creates a new `WavFrontend` instance with the specified configuration. If a CMVN file is provided in the config, it loads the mean and variance value
src/wavfrontend.rs:112
Methodnew
(mut file: File, chunk_size: usize, delay: Duration)
examples/stream.rs:24
Methodset_vad_silence_notification
(&mut self, ms: Option<u32>)
src/lib.rs:517