<RadzenRow>
    <RadzenColumn Size="6">
        <RadzenSpeechToTextButton Change="@(args => OnSpeechCaptured(args, false, "Button1"))" />
        <EventConsole @ref=@console />
    </RadzenColumn>
    <RadzenColumn Size="6">
        <RadzenSpeechToTextButton Change="@(args => OnSpeechCaptured(args, true, "Button2"))" />
        <RadzenTextArea @bind-Value=@value Change=@(args => OnTextAreaChange(args, "TextArea")) Style="width: 100%" class="rz-mt-4" aria-label="text area" />
    </RadzenColumn>
</RadzenRow>

@code {
    string value;
    EventConsole console;

    void OnTextAreaChange(string value, string name)
    {
        console.Log($"{name} value changed to {value}");
    }

    void OnSpeechCaptured(string speechValue, bool updateTextArea, string name)
    {
        console.Log($"Speech Captured from {name}: {speechValue}");

        if (updateTextArea)
        {
            value += speechValue;
        }
    }
}