[−][src]Function ttspico_sys::pico_getData
pub unsafe extern "C" fn pico_getData(
engine: pico_Engine,
outBuffer: *mut c_void,
bufferSize: pico_Int16,
outBytesReceived: *mut pico_Int16,
outDataType: *mut pico_Int16
) -> pico_Status
Gets speech data from the engine. Every time this function is called, the engine performs, within a short time slot, a small amount of processing its input text, and then gives control back to the calling application. Ie. after calling 'pico_putTextUtf8' (incl. a final embedded '\0'), this function needs to be called repeatedly till 'outBytesReceived' bytes are returned in 'outBuffer'. The type of data returned in 'outBuffer' (e.g. 8 or 16 bit PCM samples) is returned in 'outDataType' and depends on the lingware resources. Possible 'outDataType' values are listed in picodefs.h (PICO_DATA_*). This function returns PICO_STEP_BUSY while processing input and producing speech output. Once all data is returned and there is no more input text available in the Pico text input buffer, PICO_STEP_IDLE is returned. All other function return values indicate a system error.