Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cjpais/transcribe-rs
/ functions
Functions
374 in github.com/cjpais/transcribe-rs
⨍
Functions
374
◇
Types & classes
70
↓ 62 callers
Method
get
(&self, id: i64)
src/decode/tokens.rs:85
↓ 32 callers
Method
feed
( &mut self, model: &mut dyn SpeechModel, samples: &[f32], )
src/transcriber/vad_chunked.rs:240
↓ 30 callers
Function
require_paths
(paths: &[&Path])
tests/common/mod.rs:6
↓ 24 callers
Function
read_wav_samples
Read WAV file samples and convert them to the required format. This function reads a WAV file and converts it to the format expected by transcription
src/audio.rs:51
↓ 23 callers
Method
transcribe_file
( &self, wav_path: &std::path::Path, params: Self::RequestParams, )
src/remote/openai.rs:151
↓ 20 callers
Method
as_str
(&self)
src/remote/openai.rs:135
↓ 19 callers
Method
build
(mut self)
src/whisperfile.rs:88
↓ 19 callers
Function
make_speech
(frame_size: usize, num_frames: usize)
src/transcriber/test_helpers.rs:83
↓ 15 callers
Method
transcribe_with
Transcribe with model-specific parameters.
src/whisperfile.rs:323
↓ 14 callers
Function
make_silence
(frame_size: usize, num_frames: usize)
src/transcriber/test_helpers.rs:87
↓ 12 callers
Function
create_session
Create an ONNX session with standard settings.
src/onnx/session.rs:203
↓ 10 callers
Function
make_smoothed
Helper: creates a SmoothedVad wrapping an EnergyVad
src/vad/mod.rs:299
↓ 10 callers
Method
transcribe
Convenience: feed all samples and finish in one call. The return value of `feed()` is intentionally discarded here — intermediate results are accumul
src/transcriber/mod.rs:145
↓ 9 callers
Method
name
(self)
src/onnx/canary/mod.rs:41
↓ 8 callers
Method
is_speech
(&mut self, frame: &[f32])
src/vad/mod.rs:89
↓ 8 callers
Function
read_metadata_i32
Read a custom metadata i32 value, with optional default.
src/onnx/session.rs:252
↓ 8 callers
Function
resolve_model_path
Resolve a model file path for the requested quantization level. Looks for `{name}.{suffix}.onnx` based on the quantization variant, falling back to `
src/onnx/session.rs:216
↓ 8 callers
Method
transcribe
Transcribe audio samples (16 kHz, mono, f32 in [-1, 1]). Prepends/appends silence padding based on [`TranscribeOptions`] (or engine defaults), runs [
src/lib.rs:201
↓ 7 callers
Method
feed
( &mut self, model: &mut dyn SpeechModel, samples: &[f32], )
src/transcriber/energy_adaptive_chunked.rs:177
↓ 6 callers
Method
decoder_input_name
(&self, preferred: &str, fallbacks: &[&str])
src/onnx/cohere/mod.rs:327
↓ 6 callers
Function
merge_sequential
Merge chunk results into a single result. Text is joined with `separator` (default `" "`). Use `""` for languages that don't use space separators (Ch
src/transcriber/merge.rs:12
↓ 4 callers
Method
frame_size
(&self)
src/vad/mod.rs:85
↓ 4 callers
Function
get_engine
()
tests/whisperfile.rs:44
↓ 4 callers
Method
load
Load a Whisperfile engine with default server parameters.
src/whisperfile.rs:216
↓ 4 callers
Method
next_token
Given logits for the last decoder position, pick the next token. Returns `Some(token_id)` to continue decoding, or `None` to stop (EOS reached or rep
src/decode/greedy.rs:37
↓ 4 callers
Function
parse_byte_token
Parse a byte-level BPE token like `<0xE5>` into its byte value. SentencePiece tokenizers emit these for characters outside the base vocabulary (e.g.
src/decode/sentencepiece.rs:19
↓ 4 callers
Function
remove_output
( outputs: &mut ort::session::SessionOutputs, name: &str, )
src/onnx/cohere/mod.rs:402
↓ 4 callers
Function
set_ort_accelerator
Set the global ORT accelerator preference. Call once, early in the program, before any ORT models are loaded.
src/accel.rs:66
↓ 4 callers
Function
set_whisper_accelerator
Set the global whisper.cpp accelerator preference. Call once, early in the program, before any Whisper models are loaded.
src/accel.rs:191
↓ 4 callers
Function
set_whisper_gpu_device
Set the preferred GPU device index for whisper.cpp. - `-1` (default, [`GPU_DEVICE_AUTO`]): automatically select the best device (prefers dedicated GP
src/accel.rs:280
↓ 4 callers
Method
text
(mut self, name: &str, value: &str)
src/whisperfile.rs:75
↓ 3 callers
Method
drain_prefill
(&mut self)
src/vad/mod.rs:224
↓ 3 callers
Method
finish
( &mut self, model: &mut dyn SpeechModel, )
src/transcriber/vad_chunked.rs:324
↓ 3 callers
Method
flush_speech_buffer
Take the entire speech buffer and transcribe it as one chunk.
src/transcriber/vad_chunked.rs:146
↓ 3 callers
Function
get_engine
()
tests/whisper.rs:34
↓ 3 callers
Function
get_ort_accelerator
Get the current ORT accelerator preference.
src/accel.rs:71
↓ 3 callers
Function
load_vocab
Load a vocabulary file where each line is `token id`. Returns a Vec indexed by token ID, and the blank token index. Replaces `▁` (U+2581) with space
src/decode/tokens.rs:9
↓ 3 callers
Function
merge_sequential_with_separator
Merge chunk results with a custom separator between chunk texts.
src/transcriber/merge.rs:17
↓ 3 callers
Method
offset_timestamps
Shift all segment timestamps by `offset_secs`, clamping to zero. Use a negative offset to compensate for leading silence padding, or a positive offse
src/lib.rs:265
↓ 3 callers
Function
read_metadata_str
Read a custom metadata string from an ONNX session.
src/onnx/session.rs:246
↓ 3 callers
Method
reset
(&mut self)
src/vad/mod.rs:101
↓ 3 callers
Function
resolve_model_file
( model_dir: &Path, candidates: &[&str], missing_name: &str, )
src/onnx/cohere/mod.rs:367
↓ 2 callers
Function
build_session
Internal session builder with full control over threading and EP selection.
src/onnx/session.rs:148
↓ 2 callers
Method
capabilities
(&self)
src/whisperfile.rs:487
↓ 2 callers
Method
compute_cross_kv
(&mut self, state: &mut StreamingState)
src/onnx/moonshine/streaming.rs:594
↓ 2 callers
Function
compute_mel
Compute mel spectrogram features from audio samples. Always returns an array of shape `[num_frames, num_mels]` (time-major).
src/features/mel.rs:49
↓ 2 callers
Method
create_state
(&self)
src/onnx/moonshine/streaming.rs:362
↓ 2 callers
Function
create_temp_dir
(name: &str)
src/onnx/canary/vocab.rs:139
↓ 2 callers
Function
create_tokens_from_timestamped_result
(timestamped_result: &TimestampedResult)
src/onnx/parakeet/mod.rs:538
↓ 2 callers
Function
create_word_from_tokens
(tokens: &[Token])
src/onnx/parakeet/mod.rs:595
↓ 2 callers
Function
ctc_greedy_decode
CTC greedy search decoder. For each time step, selects the token with highest logit. Skips blank tokens and consecutive repeated tokens.
src/decode/ctc.rs:15
↓ 2 callers
Method
decode
(&self, tokens: &[i64])
src/onnx/moonshine/streaming.rs:246
↓ 2 callers
Method
decode
(&self, token_ids: &[i64])
src/onnx/moonshine/model.rs:404
↓ 2 callers
Method
decode_tokens
(&self, token_ids: &[i64])
src/onnx/canary/vocab.rs:116
↓ 2 callers
Function
default_engine
()
src/remote/openai.rs:75
↓ 2 callers
Method
file
(mut self, name: &str, filename: &str, content_type: &str, data: Vec<u8>)
src/whisperfile.rs:60
↓ 2 callers
Method
finish
( &mut self, model: &mut dyn SpeechModel, )
src/transcriber/energy_adaptive_chunked.rs:203
↓ 2 callers
Method
generate
( &mut self, samples: &[f32], max_tokens_per_second: f32, max_tokens_override:
src/onnx/moonshine/streaming.rs:736
↓ 2 callers
Function
group_tokens_into_words
(tokens: &[Token])
src/onnx/parakeet/mod.rs:561
↓ 2 callers
Function
hz_to_mel
(hz: f32)
src/features/mel.rs:253
↓ 2 callers
Method
infer
( &mut self, samples: &[f32], params: &WhisperInferenceParams, )
src/whisper_cpp/mod.rs:210
↓ 2 callers
Method
infer
( &mut self, samples: &[f32], max_length: usize, )
src/onnx/moonshine/model.rs:110
↓ 2 callers
Method
infer
( &mut self, samples: &[f32], granularity: &TimestampGranularity, )
src/onnx/parakeet/mod.rs:151
↓ 2 callers
Method
infer
(&mut self, samples: &[f32])
src/onnx/gigaam/mod.rs:92
↓ 2 callers
Method
infer
( &mut self, samples: &[f32], language: &str, use_itn: bool, )
src/onnx/sense_voice/mod.rs:196
↓ 2 callers
Function
make_window
Generate a window function of the given type and length.
src/features/mel.rs:197
↓ 2 callers
Function
mel_filterbank
Compute mel filterbank matrix of shape [num_mels, num_fft_bins].
src/features/mel.rs:209
↓ 2 callers
Function
prepend_silence
Prepend silence to audio samples. Returns a new buffer with `silence_ms` milliseconds of zeros followed by the original samples. Assumes 16 kHz sampl
src/audio.rs:104
↓ 2 callers
Function
read_metadata_float_vec
Read a comma-separated float vector from metadata.
src/onnx/session.rs:269
↓ 2 callers
Function
requires_sequential_session
Returns true if the selected execution provider requires sequential execution and disabled memory patterns (DirectML, WebGPU).
src/onnx/session.rs:133
↓ 2 callers
Function
rms_energy
Compute RMS energy of an audio frame.
src/transcriber/mod.rs:51
↓ 2 callers
Method
token_rate
(&self)
src/onnx/moonshine/mod.rs:54
↓ 2 callers
Method
transcribe_chunk
Transcribe a chunk of audio samples at a given position. Does not touch `self.speech_buffer` or `self.speech_start_sample` — callers manage buffer sta
src/transcriber/vad_chunked.rs:163
↓ 2 callers
Method
transcribe_chunk
( &mut self, model: &mut dyn SpeechModel, chunk: &[f32], chunk_start_samples:
src/transcriber/energy_adaptive_chunked.rs:110
↓ 2 callers
Function
transcribe_padded
Transcribe a chunk with optional silence padding and timestamp adjustment. Sets leading/trailing silence on [`TranscribeOptions`] and delegates paddi
src/transcriber/mod.rs:68
↓ 2 callers
Method
transcribe_raw
( &mut self, samples: &[f32], options: &TranscribeOptions, )
src/whisperfile.rs:491
↓ 2 callers
Method
transcribe_samples_inner
( &self, samples: &[f32], params: Option<WhisperfileInferenceParams>, )
src/whisperfile.rs:377
↓ 2 callers
Method
transcribe_wav_bytes
( &self, wav_data: Vec<u8>, params: Option<WhisperfileInferenceParams>, )
src/whisperfile.rs:403
↓ 2 callers
Method
with_max_repeats
(mut self, n: usize)
src/decode/greedy.rs:28
↓ 1 callers
Method
apply_base64_decode
(&mut self)
src/decode/tokens.rs:74
↓ 1 callers
Function
apply_cmvn
Apply Cepstral Mean-Variance Normalization (CMVN). Formula: `x[i] = (x[i] + neg_mean[i]) * inv_stddev[i]` Modifies features in-place.
src/features/cmvn.rs:8
↓ 1 callers
Function
apply_lfr
Apply Lower Frame Rate (LFR) stacking. Concatenates `window_size` consecutive frames with a stride of `window_shift`, reducing temporal resolution wh
src/features/lfr.rs:10
↓ 1 callers
Function
argmax
(logits: &[f32])
src/decode/greedy.rs:63
↓ 1 callers
Method
as_arg
(&self)
src/whisperfile.rs:146
↓ 1 callers
Function
auto_select_gpu_device
Auto-select the best GPU device for whisper inference. Prefers dedicated GPUs over integrated, then picks the device with the most total VRAM as a ti
src/whisper_cpp/gpu.rs:111
↓ 1 callers
Function
binary_path
()
tests/whisperfile.rs:9
↓ 1 callers
Method
build_prompt
( &self, src_lang: &str, tgt_lang: &str, use_pnc: bool, use_itn: bool,
src/onnx/canary/vocab.rs:82
↓ 1 callers
Method
build_prompt_ids
(&self, language: Option<&str>)
src/onnx/cohere/mod.rs:260
↓ 1 callers
Function
compute_fbank
FBANK-style feature extraction (SenseVoice): pre-emphasis + windowed frames + mel filterbank. Returns [num_frames, num_mels].
src/features/mel.rs:62
↓ 1 callers
Function
compute_mel_spectrogram
Standard mel spectrogram (GigaAM-style): windowed STFT + mel filterbank + log. Returns [num_frames, num_mels].
src/features/mel.rs:151
↓ 1 callers
Method
convert_result
(&self, decoder_result: &CtcDecoderResult)
src/onnx/sense_voice/mod.rs:357
↓ 1 callers
Function
convert_timestamps
( timestamped_result: &TimestampedResult, granularity: &TimestampGranularity, )
src/onnx/parakeet/mod.rs:455
↓ 1 callers
Function
convert_to_hierarchical_segment_segments
( timestamped_result: &TimestampedResult, )
src/onnx/parakeet/mod.rs:516
↓ 1 callers
Function
convert_to_hierarchical_word_segments
( timestamped_result: &TimestampedResult, )
src/onnx/parakeet/mod.rs:495
↓ 1 callers
Function
convert_to_raw_token_segments
( timestamped_result: &TimestampedResult, )
src/onnx/parakeet/mod.rs:468
↓ 1 callers
Method
create_decoder_state
(&self)
src/onnx/parakeet/mod.rs:219
↓ 1 callers
Function
create_session_with_threads
Create an ONNX session with configurable thread count.
src/onnx/session.rs:208
↓ 1 callers
Function
decode_autoregressive
( decoder: &mut Session, encoder_embeddings: &DynValue, encoder_mask: &DynValue, prompt_tokens
src/onnx/canary/decoder.rs:10
↓ 1 callers
Method
decode_ids
(&self, token_ids: &[i64])
src/onnx/cohere/mod.rs:296
↓ 1 callers
Method
decode_sequence
( &mut self, encodings: &ArrayViewD<f32>, encodings_len: usize, )
src/onnx/parakeet/mod.rs:328
next →
1–100 of 374, ranked by callers