|
<< Click to display table of contents >> TRVSpeechToTextEvent |
Unit [VCL and LCL] MRVFFmpegSTT;
Unit [FMX] fmxMRVFFmpegSTT;
type
TRVSpeechToTextEvent = procedure (Sender: TObject;
const AText: TRVMUnicodeString) of object;
Events of this type occur when a fragment of text from speech is recognized.
AText is a recognized text fragment.
Warning: This event is called in the context of a background thread. You cannot interact with the user interface in this event.
Recommended workflow:
•Create a text string in which to accumulate recognized text.
•In this event, accumulate text in this string.
•Create a timer (TTimer). Using the timer, display the accumulated string to the user, and then clear it.
In all cases, protect access to the string with a critical section (TCriticalSection). Finish the sound and timer before you destroy the critical section.
This is a type of the following events: