Struct deepspeech::Stream [−][src]
pub struct Stream { /* fields omitted */ }
Methods
impl Stream
[src]
impl Stream
pub fn feed_audio(&mut self, buffer: &[i16])
[src]
pub fn feed_audio(&mut self, buffer: &[i16])
Feed audio samples to the stream
The input buffer must consist of mono 16-bit samples.
pub fn intermediate_decode(&mut self) -> Result<String, FromUtf8Error>
[src]
pub fn intermediate_decode(&mut self) -> Result<String, FromUtf8Error>
Decodes the intermediate state of what has been spoken up until now
Note that as of DeepSpeech version 0.2.0, this function is non-trivial as the decoder can't do streaming yet.
pub fn finish(self) -> Result<String, FromUtf8Error>
[src]
pub fn finish(self) -> Result<String, FromUtf8Error>
Deallocates the stream and returns the decoded text