Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/darkautism/sensevoice-rs
/ functions
Functions
46 in github.com/darkautism/sensevoice-rs
⨍
Functions
46
◇
Types & classes
22
↓ 8 callers
Method
forward
(&self, xs: &Tensor)
src/asr_candle_pt.rs:147
↓ 5 callers
Method
forward
( &self, input: &Tensor, cache: &Tensor, )
src/silero_vad.rs:36
↓ 4 callers
Method
reset
(&mut self)
src/silero_vad.rs:349
↓ 3 callers
Method
destroy
Destroys the `SenseVoiceSmall` instance, releasing associated resources. This method ensures that the RKNN model resources are properly cleaned up.
src/lib.rs:848
↓ 2 callers
Method
extract_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 callers
Method
finalize_segment
(&mut self, trim_tail: bool)
src/silero_vad.rs:316
↓ 2 callers
Method
finish
(&mut self)
src/silero_vad.rs:359
↓ 2 callers
Method
ids_to_text
Helper to convert token IDs to text
src/lib.rs:738
↓ 2 callers
Method
infer_file
Performs speech recognition on an audio file.
src/lib.rs:674
↓ 2 callers
Function
parse_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 callers
Method
recognition
(&self, segment: &[i16])
src/lib.rs:584
↓ 2 callers
Method
run
( &self, audio_feats: &Array2<f32>, _speech_length: i64, language: i64,
src/asr_candle_pt.rs:267
↓ 1 callers
Method
apply_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 callers
Method
apply_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 callers
Method
compute_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 callers
Method
decode_asr_output
(&self, output: &[f32])
src/lib.rs:709
↓ 1 callers
Method
decode_onnx_output
Decodes ONNX output.
src/lib.rs:757
↓ 1 callers
Method
fill_buffer
(&mut self)
examples/stream.rs:36
↓ 1 callers
Method
forward_simple
(&self, xs: &Tensor)
src/asr_candle_pt.rs:74
↓ 1 callers
Method
infer_stream
( &'a mut self, input_stream: S, )
src/lib.rs:620
↓ 1 callers
Method
infer_vec
Performs speech recognition on a vector of audio samples.
src/lib.rs:522
↓ 1 callers
Method
positional_encoding
( &self, seq_len: usize, dim: usize, )
src/asr_candle_pt.rs:209
↓ 1 callers
Method
predict_probability
( &mut self, chunk: &[i16; CHUNK_SIZE], )
src/silero_vad.rs:124
↓ 1 callers
Method
prepare_rknn_input_advanced
( &self, feats: &Array2<f32>, language: usize, use_itn: bool, )
src/lib.rs:867
↓ 1 callers
Method
process_chunk
(&mut self, chunk: &[i16; CHUNK_SIZE])
src/silero_vad.rs:258
↓ 1 callers
Method
read
(&mut self, buf: &mut [u8])
examples/stream.rs:51
↓ 1 callers
Function
reader_to_stream
(mut reader: DelayedReader)
examples/stream.rs:71
↓ 1 callers
Method
set_notify_silence_after_ms
更新通知靜音的設定
src/silero_vad.rs:251
Method
default
()
src/silero_vad.rs:195
Method
default
Creates a `WavFrontendConfig` instance with default values. # Returns A `WavFrontendConfig` instance with commonly used default settings.
src/wavfrontend.rs:58
Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
src/lib.rs:286
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/silero_vad.rs:68
Method
from_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
Method
init
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
Method
init_official_model_pt
Initializes using official `FunAudioLLM/SenseVoiceSmall` assets (`model.pt` path). This uses the native Candle PT backend.
src/lib.rs:428
Method
init_with_config
Initializes a new `SenseVoiceSmall` instance with custom configuration. # Arguments `config` - The configuration containing file paths. `vadconfig`
src/lib.rs:453
Method
load_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
Function
main
()
examples/official_model_pt.rs:4
Function
main
()
examples/stream.rs:95
Function
main
()
examples/basic.rs:4
Method
new
( vb: VarBuilder, n_head: usize, in_dim: usize, hidden_dim: usize, )
src/asr_candle_pt.rs:37
Method
new
Creates a new `SenseVoiceSmallError` instance with the given message. # Arguments `message` - The error message to encapsulate. # Returns A new `S
src/lib.rs:305
Method
new
(vb: VarBuilder)
src/silero_vad.rs:22
Method
new
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
Method
new
(mut file: File, chunk_size: usize, delay: Duration)
examples/stream.rs:24
Method
set_vad_silence_notification
(&mut self, ms: Option<u32>)
src/lib.rs:517