[][src]Function deepspeech_sys::DS_SetupStream

pub unsafe extern "C" fn DS_SetupStream(
    aCtx: *mut ModelState,
    aPreAllocFrames: c_uint,
    aSampleRate: c_uint,
    retval: *mut *mut StreamingState
) -> c_int

@brief Create a new streaming inference state. The streaming state returned by this function can then be passed to {@link DS_FeedAudioContent()} and {@link DS_FinishStream()}.

@param aCtx The ModelState pointer for the model to use. @param aPreAllocFrames Number of timestep frames to reserve. One timestep is equivalent to two window lengths (20ms). If set to 0 we reserve enough frames for 3 seconds of audio (150). @param aSampleRate The sample-rate of the audio signal. @param[out] retval an opaque pointer that represents the streaming state. Can be NULL if an error occurs.

@return Zero for success, non-zero on failure.