Struct deepspeech::Model
[−]
[src]
pub struct Model { /* fields omitted */ }
Methods
impl Model
[src]
fn load_from_files(
model_path: &Path,
n_cep: u16,
n_context: u16,
alphabet_path: &Path,
beam_width: u16
) -> Self
[src]
model_path: &Path,
n_cep: u16,
n_context: u16,
alphabet_path: &Path,
beam_width: u16
) -> Self
Load a DeepSpeech model from the specified model and alphabet file paths
fn enable_decoder_with_lm(
&mut self,
alphabet_path: &Path,
language_model_path: &Path,
trie_path: &Path,
weight: f32,
word_count_weight: f32,
valid_word_count_weight: f32
)
[src]
&mut self,
alphabet_path: &Path,
language_model_path: &Path,
trie_path: &Path,
weight: f32,
word_count_weight: f32,
valid_word_count_weight: f32
)
Load a KenLM language model from a file and enable decoding using beam scoring
fn speech_to_text(
&mut self,
buffer: &[i16],
sample_rate: u32
) -> Result<String, FromUtf8Error>
[src]
&mut self,
buffer: &[i16],
sample_rate: u32
) -> Result<String, FromUtf8Error>
Perform speech-to-text using the model
The input buffer must consist of mono 16-bit samples. The sample rate is not freely chooseable but a property of the model files.