/// <summary> /// Use the DeepSpeech model to perform Speech-To-Text, return results including metadata. /// </summary> /// <param name="aBuffer">A 16-bit, mono raw audio signal at the appropriate sample rate (matching what the model was trained on).</param> /// <param name="aBufferSize">The number of samples in the audio signal.</param> /// <param name="aNumResults">Maximum number of candidate transcripts to return. Returned list might be smaller than this.</param> /// <returns>The extended metadata. Returns NULL on error.</returns> public unsafe Metadata SpeechToTextWithMetadata(short[] aBuffer, uint aBufferSize, uint aNumResults) { return(NativeImp.DS_SpeechToTextWithMetadata(_modelStatePP, aBuffer, aBufferSize, aNumResults).PtrToMetadata()); }
/// <summary> /// Use the DeepSpeech model to perform Speech-To-Text. /// </summary> /// <param name="aBuffer">A 16-bit, mono raw audio signal at the appropriate sample rate.</param> /// <param name="aBufferSize">The number of samples in the audio signal.</param> /// <param name="aSampleRate">The sample-rate of the audio signal.</param> /// <returns>The extended metadata. The user is responsible for freeing the struct. Returns NULL on error.</returns> public unsafe Models.Metadata SpeechToTextWithMetadata(short[] aBuffer, uint aBufferSize, uint aSampleRate) { return(NativeImp.DS_SpeechToTextWithMetadata(_modelStatePP, aBuffer, aBufferSize, aSampleRate).PtrToMetadata()); }